diff --git "a/mediagallery/backend/gradio_mediagallery/templates/component/index.js" "b/mediagallery/backend/gradio_mediagallery/templates/component/index.js" --- "a/mediagallery/backend/gradio_mediagallery/templates/component/index.js" +++ "b/mediagallery/backend/gradio_mediagallery/templates/component/index.js" @@ -1,10 +1,10 @@ var C4 = Object.defineProperty; -var Id = (i) => { - throw TypeError(i); +var Id = (r) => { + throw TypeError(r); }; -var F4 = (i, e, t) => e in i ? C4(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t; -var it = (i, e, t) => F4(i, typeof e != "symbol" ? e + "" : e, t), L0 = (i, e, t) => e.has(i) || Id("Cannot " + t); -var ys = (i, e, t) => (L0(i, e, "read from private field"), t ? t.call(i) : e.get(i)), R0 = (i, e, t) => e.has(i) ? Id("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), Ld = (i, e, t, n) => (L0(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), mo = (i, e, t) => (L0(i, e, "access private method"), t); +var F4 = (r, e, t) => e in r ? C4(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t; +var rt = (r, e, t) => F4(r, typeof e != "symbol" ? e + "" : e, t), L0 = (r, e, t) => e.has(r) || Id("Cannot " + t); +var ys = (r, e, t) => (L0(r, e, "read from private field"), t ? t.call(r) : e.get(r)), R0 = (r, e, t) => e.has(r) ? Id("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Ld = (r, e, t, n) => (L0(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), mo = (r, e, t) => (L0(r, e, "access private method"), t); const { SvelteComponent: P4, append_hydration: uc, @@ -16,7 +16,7 @@ const { claim_space: mp, claim_svg_element: C0, create_slot: B4, - detach: Ii, + detach: Ir, element: gp, empty: Rd, get_all_dirty_from_scope: N4, @@ -36,8 +36,8 @@ const { transition_out: vp, update_slot_base: V4 } = window.__gradio__svelte__internal; -function Fd(i) { - let e, t, n, r, s; +function Fd(r) { + let e, t, n, i, s; return { c() { e = F0("svg"), t = F0("line"), n = F0("line"), this.h(); @@ -52,64 +52,64 @@ function Fd(i) { y2: !0, stroke: !0, "stroke-width": !0 - }), xa(t).forEach(Ii), n = C0(o, "line", { + }), xa(t).forEach(Ir), n = C0(o, "line", { x1: !0, y1: !0, x2: !0, y2: !0, stroke: !0, "stroke-width": !0 - }), xa(n).forEach(Ii), o.forEach(Ii), this.h(); + }), xa(n).forEach(Ir), o.forEach(Ir), this.h(); }, h() { rn(t, "x1", "1"), rn(t, "y1", "9"), rn(t, "x2", "9"), rn(t, "y2", "1"), rn(t, "stroke", "gray"), rn(t, "stroke-width", "0.5"), rn(n, "x1", "5"), rn(n, "y1", "9"), rn(n, "x2", "9"), rn(n, "y2", "5"), rn(n, "stroke", "gray"), rn(n, "stroke-width", "0.5"), rn(e, "class", "resize-handle svelte-239wnu"), rn(e, "xmlns", "http://www.w3.org/2000/svg"), rn(e, "viewBox", "0 0 10 10"); }, m(a, o) { - Pa(a, e, o), uc(e, t), uc(e, n), r || (s = G4( + Pa(a, e, o), uc(e, t), uc(e, n), i || (s = G4( e, "mousedown", /*resize*/ - i[27] - ), r = !0); + r[27] + ), i = !0); }, p: z4, d(a) { - a && Ii(e), r = !1, s(); + a && Ir(e), i = !1, s(); } }; } -function K4(i) { +function K4(r) { var h; - let e, t, n, r, s; + let e, t, n, i, s; const a = ( /*#slots*/ - i[31].default + r[31].default ), o = B4( a, - i, + r, /*$$scope*/ - i[30], + r[30], null ); let l = ( /*resizable*/ - i[19] && Fd(i) + r[19] && Fd(r) ), u = [ { "data-testid": ( /*test_id*/ - i[11] + r[11] ) }, { id: ( /*elem_id*/ - i[6] + r[6] ) }, { class: n = "block " + /*elem_classes*/ - (((h = i[7]) == null ? void 0 : h.join(" ")) || "") + " svelte-239wnu" + (((h = r[7]) == null ? void 0 : h.join(" ")) || "") + " svelte-239wnu" }, { - dir: r = /*rtl*/ - i[20] ? "rtl" : "ltr" + dir: i = /*rtl*/ + r[20] ? "rtl" : "ltr" } ], c = {}; for (let d = 0; d < u.length; d += 1) @@ -118,14 +118,14 @@ function K4(i) { c() { e = gp( /*tag*/ - i[25] + r[25] ), o && o.c(), t = pp(), l && l.c(), this.h(); }, l(d) { e = fp( d, /*tag*/ - (i[25] || "null").toUpperCase(), + (r[25] || "null").toUpperCase(), { "data-testid": !0, id: !0, @@ -134,148 +134,148 @@ function K4(i) { } ); var f = xa(e); - o && o.l(f), t = mp(f), l && l.l(f), f.forEach(Ii), this.h(); + o && o.l(f), t = mp(f), l && l.l(f), f.forEach(Ir), this.h(); }, h() { Cd( /*tag*/ - i[25] + r[25] )(e, c), Nt( e, "hidden", /*visible*/ - i[14] === !1 + r[14] === !1 ), Nt( e, "padded", /*padding*/ - i[10] + r[10] ), Nt( e, "flex", /*flex*/ - i[1] + r[1] ), Nt( e, "border_focus", /*border_mode*/ - i[9] === "focus" + r[9] === "focus" ), Nt( e, "border_contrast", /*border_mode*/ - i[9] === "contrast" + r[9] === "contrast" ), Nt(e, "hide-container", !/*explicit_call*/ - i[12] && !/*container*/ - i[13]), Nt( + r[12] && !/*container*/ + r[13]), Nt( e, "fullscreen", /*fullscreen*/ - i[0] + r[0] ), Nt( e, "animating", /*fullscreen*/ - i[0] && /*preexpansionBoundingRect*/ - i[24] !== null + r[0] && /*preexpansionBoundingRect*/ + r[24] !== null ), Nt( e, "auto-margin", /*scale*/ - i[17] === null + r[17] === null ), Ke( e, "height", /*fullscreen*/ - i[0] ? void 0 : ( + r[0] ? void 0 : ( /*get_dimension*/ - i[26]( + r[26]( /*height*/ - i[2] + r[2] ) ) ), Ke( e, "min-height", /*fullscreen*/ - i[0] ? void 0 : ( + r[0] ? void 0 : ( /*get_dimension*/ - i[26]( + r[26]( /*min_height*/ - i[3] + r[3] ) ) ), Ke( e, "max-height", /*fullscreen*/ - i[0] ? void 0 : ( + r[0] ? void 0 : ( /*get_dimension*/ - i[26]( + r[26]( /*max_height*/ - i[4] + r[4] ) ) ), Ke( e, "--start-top", /*preexpansionBoundingRect*/ - i[24] ? `${/*preexpansionBoundingRect*/ - i[24].top}px` : "0px" + r[24] ? `${/*preexpansionBoundingRect*/ + r[24].top}px` : "0px" ), Ke( e, "--start-left", /*preexpansionBoundingRect*/ - i[24] ? `${/*preexpansionBoundingRect*/ - i[24].left}px` : "0px" + r[24] ? `${/*preexpansionBoundingRect*/ + r[24].left}px` : "0px" ), Ke( e, "--start-width", /*preexpansionBoundingRect*/ - i[24] ? `${/*preexpansionBoundingRect*/ - i[24].width}px` : "0px" + r[24] ? `${/*preexpansionBoundingRect*/ + r[24].width}px` : "0px" ), Ke( e, "--start-height", /*preexpansionBoundingRect*/ - i[24] ? `${/*preexpansionBoundingRect*/ - i[24].height}px` : "0px" + r[24] ? `${/*preexpansionBoundingRect*/ + r[24].height}px` : "0px" ), Ke( e, "width", /*fullscreen*/ - i[0] ? void 0 : typeof /*width*/ - i[5] == "number" ? `calc(min(${/*width*/ - i[5]}px, 100%))` : ( + r[0] ? void 0 : typeof /*width*/ + r[5] == "number" ? `calc(min(${/*width*/ + r[5]}px, 100%))` : ( /*get_dimension*/ - i[26]( + r[26]( /*width*/ - i[5] + r[5] ) ) ), Ke( e, "border-style", /*variant*/ - i[8] + r[8] ), Ke( e, "overflow", /*allow_overflow*/ - i[15] ? ( + r[15] ? ( /*overflow_behavior*/ - i[16] + r[16] ) : "hidden" ), Ke( e, "flex-grow", /*scale*/ - i[17] + r[17] ), Ke(e, "min-width", `calc(min(${/*min_width*/ - i[18]}px, 100%))`), Ke(e, "border-width", "var(--block-border-width)"); + r[18]}px, 100%))`), Ke(e, "border-width", "var(--block-border-width)"); }, m(d, f) { - Pa(d, e, f), o && o.m(e, null), uc(e, t), l && l.m(e, null), i[32](e), s = !0; + Pa(d, e, f), o && o.m(e, null), uc(e, t), l && l.m(e, null), r[32](e), s = !0; }, p(d, f) { var m; @@ -316,8 +316,8 @@ function K4(i) { 128 && n !== (n = "block " + /*elem_classes*/ (((m = d[7]) == null ? void 0 : m.join(" ")) || "") + " svelte-239wnu")) && { class: n }, (!s || f[0] & /*rtl*/ - 1048576 && r !== (r = /*rtl*/ - d[20] ? "rtl" : "ltr")) && { dir: r } + 1048576 && i !== (i = /*rtl*/ + d[20] ? "rtl" : "ltr")) && { dir: i } ])), Nt( e, "hidden", @@ -471,30 +471,30 @@ function K4(i) { vp(o, d), s = !1; }, d(d) { - d && Ii(e), o && o.d(d), l && l.d(), i[32](null); + d && Ir(e), o && o.d(d), l && l.d(), r[32](null); } }; } -function Pd(i) { +function Pd(r) { let e; return { c() { e = gp("div"), this.h(); }, l(t) { - e = fp(t, "DIV", { class: !0 }), xa(e).forEach(Ii), this.h(); + e = fp(t, "DIV", { class: !0 }), xa(e).forEach(Ir), this.h(); }, h() { rn(e, "class", "placeholder svelte-239wnu"), Ke( e, "height", /*placeholder_height*/ - i[22] + "px" + r[22] + "px" ), Ke( e, "width", /*placeholder_width*/ - i[23] + "px" + r[23] + "px" ); }, m(t, n) { @@ -516,46 +516,46 @@ function Pd(i) { ); }, d(t) { - t && Ii(e); + t && Ir(e); } }; } -function j4(i) { - let e, t, n, r = ( +function j4(r) { + let e, t, n, i = ( /*tag*/ - i[25] && K4(i) + r[25] && K4(r) ), s = ( /*fullscreen*/ - i[0] && Pd(i) + r[0] && Pd(r) ); return { c() { - r && r.c(), e = pp(), s && s.c(), t = Rd(); + i && i.c(), e = pp(), s && s.c(), t = Rd(); }, l(a) { - r && r.l(a), e = mp(a), s && s.l(a), t = Rd(); + i && i.l(a), e = mp(a), s && s.l(a), t = Rd(); }, m(a, o) { - r && r.m(a, o), Pa(a, e, o), s && s.m(a, o), Pa(a, t, o), n = !0; + i && i.m(a, o), Pa(a, e, o), s && s.m(a, o), Pa(a, t, o), n = !0; }, p(a, o) { /*tag*/ - a[25] && r.p(a, o), /*fullscreen*/ + a[25] && i.p(a, o), /*fullscreen*/ a[0] ? s ? s.p(a, o) : (s = Pd(a), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null); }, i(a) { - n || (_p(r, a), n = !0); + n || (_p(i, a), n = !0); }, o(a) { - vp(r, a), n = !1; + vp(i, a), n = !1; }, d(a) { - a && (Ii(e), Ii(t)), r && r.d(a), s && s.d(a); + a && (Ir(e), Ir(t)), i && i.d(a), s && s.d(a); } }; } -function W4(i, e, t) { - let { $$slots: n = {}, $$scope: r } = e, { height: s = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: l = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: h = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: m = "normal" } = e, { test_id: g = void 0 } = e, { explicit_call: p = !1 } = e, { container: b = !0 } = e, { visible: y = !0 } = e, { allow_overflow: v = !0 } = e, { overflow_behavior: T = "auto" } = e, { scale: A = null } = e, { min_width: w = 0 } = e, { flex: D = !1 } = e, { resizable: L = !1 } = e, { rtl: I = !1 } = e, { fullscreen: R = !1 } = e, M = R, P, V = m === "fieldset" ? "fieldset" : "div", U = 0, J = 0, Y = null; +function W4(r, e, t) { + let { $$slots: n = {}, $$scope: i } = e, { height: s = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: l = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: h = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: m = "normal" } = e, { test_id: g = void 0 } = e, { explicit_call: p = !1 } = e, { container: b = !0 } = e, { visible: y = !0 } = e, { allow_overflow: v = !0 } = e, { overflow_behavior: T = "auto" } = e, { scale: A = null } = e, { min_width: w = 0 } = e, { flex: D = !1 } = e, { resizable: L = !1 } = e, { rtl: I = !1 } = e, { fullscreen: R = !1 } = e, M = R, P, V = m === "fieldset" ? "fieldset" : "div", U = 0, J = 0, Y = null; function X(B) { R && B.key === "Escape" && t(0, R = !1); } @@ -581,11 +581,11 @@ function W4(i, e, t) { P = B, t(21, P); }); } - return i.$$set = (B) => { - "height" in B && t(2, s = B.height), "min_height" in B && t(3, a = B.min_height), "max_height" in B && t(4, o = B.max_height), "width" in B && t(5, l = B.width), "elem_id" in B && t(6, u = B.elem_id), "elem_classes" in B && t(7, c = B.elem_classes), "variant" in B && t(8, h = B.variant), "border_mode" in B && t(9, d = B.border_mode), "padding" in B && t(10, f = B.padding), "type" in B && t(28, m = B.type), "test_id" in B && t(11, g = B.test_id), "explicit_call" in B && t(12, p = B.explicit_call), "container" in B && t(13, b = B.container), "visible" in B && t(14, y = B.visible), "allow_overflow" in B && t(15, v = B.allow_overflow), "overflow_behavior" in B && t(16, T = B.overflow_behavior), "scale" in B && t(17, A = B.scale), "min_width" in B && t(18, w = B.min_width), "flex" in B && t(1, D = B.flex), "resizable" in B && t(19, L = B.resizable), "rtl" in B && t(20, I = B.rtl), "fullscreen" in B && t(0, R = B.fullscreen), "$$scope" in B && t(30, r = B.$$scope); - }, i.$$.update = () => { - i.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/ - 538968065 && R !== M && (t(29, M = R), R ? (t(24, Y = P.getBoundingClientRect()), t(22, U = P.offsetHeight), t(23, J = P.offsetWidth), window.addEventListener("keydown", X)) : (t(24, Y = null), window.removeEventListener("keydown", X))), i.$$.dirty[0] & /*visible*/ + return r.$$set = (B) => { + "height" in B && t(2, s = B.height), "min_height" in B && t(3, a = B.min_height), "max_height" in B && t(4, o = B.max_height), "width" in B && t(5, l = B.width), "elem_id" in B && t(6, u = B.elem_id), "elem_classes" in B && t(7, c = B.elem_classes), "variant" in B && t(8, h = B.variant), "border_mode" in B && t(9, d = B.border_mode), "padding" in B && t(10, f = B.padding), "type" in B && t(28, m = B.type), "test_id" in B && t(11, g = B.test_id), "explicit_call" in B && t(12, p = B.explicit_call), "container" in B && t(13, b = B.container), "visible" in B && t(14, y = B.visible), "allow_overflow" in B && t(15, v = B.allow_overflow), "overflow_behavior" in B && t(16, T = B.overflow_behavior), "scale" in B && t(17, A = B.scale), "min_width" in B && t(18, w = B.min_width), "flex" in B && t(1, D = B.flex), "resizable" in B && t(19, L = B.resizable), "rtl" in B && t(20, I = B.rtl), "fullscreen" in B && t(0, R = B.fullscreen), "$$scope" in B && t(30, i = B.$$scope); + }, r.$$.update = () => { + r.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/ + 538968065 && R !== M && (t(29, M = R), R ? (t(24, Y = P.getBoundingClientRect()), t(22, U = P.offsetHeight), t(23, J = P.offsetWidth), window.addEventListener("keydown", X)) : (t(24, Y = null), window.removeEventListener("keydown", X))), r.$$.dirty[0] & /*visible*/ 16384 && (y || t(1, D = !1)); }, [ R, @@ -618,7 +618,7 @@ function W4(i, e, t) { Z, m, M, - r, + i, n, ne ]; @@ -700,17 +700,17 @@ class ve { // The underlying error message without any context added. constructor(e, t) { this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0; - var n = "KaTeX parse error: " + e, r, s, a = t && t.loc; + var n = "KaTeX parse error: " + e, i, s, a = t && t.loc; if (a && a.start <= a.end) { var o = a.lexer.input; - r = a.start, s = a.end, r === o.length ? n += " at end of input: " : n += " at position " + (r + 1) + ": "; - var l = o.slice(r, s).replace(/[^]/g, "$&̲"), u; - r > 15 ? u = "…" + o.slice(r - 15, r) : u = o.slice(0, r); + i = a.start, s = a.end, i === o.length ? n += " at end of input: " : n += " at position " + (i + 1) + ": "; + var l = o.slice(i, s).replace(/[^]/g, "$&̲"), u; + i > 15 ? u = "…" + o.slice(i - 15, i) : u = o.slice(0, i); var c; s + 15 < o.length ? c = o.slice(s, s + 15) + "…" : c = o.slice(s), n += u + l + c; } var h = new Error(n); - return h.name = "ParseError", h.__proto__ = ve.prototype, h.position = r, r != null && s != null && (h.length = s - r), h.rawMessage = e, h; + return h.name = "ParseError", h.__proto__ = ve.prototype, h.position = i, i != null && s != null && (h.length = s - i), h.rawMessage = e, h; } } ve.prototype.__proto__ = Error.prototype; @@ -725,19 +725,19 @@ var X4 = function(e, t) { '"': """, "'": "'" }, ey = /[&><"']/g; -function ty(i) { - return String(i).replace(ey, (e) => J4[e]); +function ty(r) { + return String(r).replace(ey, (e) => J4[e]); } -var yp = function i(e) { - return e.type === "ordgroup" || e.type === "color" ? e.body.length === 1 ? i(e.body[0]) : e : e.type === "font" ? i(e.body) : e; +var yp = function r(e) { + return e.type === "ordgroup" || e.type === "color" ? e.body.length === 1 ? r(e.body[0]) : e : e.type === "font" ? r(e.body) : e; }, ny = function(e) { var t = yp(e); return t.type === "mathord" || t.type === "textord" || t.type === "atom"; -}, iy = function(e) { +}, ry = function(e) { if (!e) throw new Error("Expected non-null, but got " + String(e)); return e; -}, ry = function(e) { +}, iy = function(e) { var t = /^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e); return t ? t[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]) ? null : t[1].toLowerCase() : "_relative"; }, ze = { @@ -746,9 +746,9 @@ var yp = function i(e) { hyphenate: Z4, getBaseElem: yp, isCharacterBox: ny, - protocolFromUrl: ry + protocolFromUrl: iy }; -class hr { +class hi { constructor(e, t, n) { this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = t, this.cramped = n; } @@ -756,40 +756,40 @@ class hr { * Get the style of a superscript given a base in the current style. */ sup() { - return Di[sy[this.id]]; + return Dr[sy[this.id]]; } /** * Get the style of a subscript given a base in the current style. */ sub() { - return Di[ay[this.id]]; + return Dr[ay[this.id]]; } /** * Get the style of a fraction numerator given the fraction in the current * style. */ fracNum() { - return Di[oy[this.id]]; + return Dr[oy[this.id]]; } /** * Get the style of a fraction denominator given the fraction in the current * style. */ fracDen() { - return Di[ly[this.id]]; + return Dr[ly[this.id]]; } /** * Get the cramped version of a style (in particular, cramping a cramped style * doesn't change the style). */ cramp() { - return Di[uy[this.id]]; + return Dr[uy[this.id]]; } /** * Get a text or display version of this style. */ text() { - return Di[cy[this.id]]; + return Dr[cy[this.id]]; } /** * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle) @@ -798,11 +798,11 @@ class hr { return this.size >= 2; } } -var hh = 0, pl = 1, Bs = 2, sr = 3, Ma = 4, jn = 5, zs = 6, dn = 7, Di = [new hr(hh, 0, !1), new hr(pl, 0, !0), new hr(Bs, 1, !1), new hr(sr, 1, !0), new hr(Ma, 2, !1), new hr(jn, 2, !0), new hr(zs, 3, !1), new hr(dn, 3, !0)], sy = [Ma, jn, Ma, jn, zs, dn, zs, dn], ay = [jn, jn, jn, jn, dn, dn, dn, dn], oy = [Bs, sr, Ma, jn, zs, dn, zs, dn], ly = [sr, sr, jn, jn, dn, dn, dn, dn], uy = [pl, pl, sr, sr, jn, jn, dn, dn], cy = [hh, pl, Bs, sr, Bs, sr, Bs, sr], Te = { - DISPLAY: Di[hh], - TEXT: Di[Bs], - SCRIPT: Di[Ma], - SCRIPTSCRIPT: Di[zs] +var hh = 0, pl = 1, Bs = 2, si = 3, Ma = 4, jn = 5, zs = 6, dn = 7, Dr = [new hi(hh, 0, !1), new hi(pl, 0, !0), new hi(Bs, 1, !1), new hi(si, 1, !0), new hi(Ma, 2, !1), new hi(jn, 2, !0), new hi(zs, 3, !1), new hi(dn, 3, !0)], sy = [Ma, jn, Ma, jn, zs, dn, zs, dn], ay = [jn, jn, jn, jn, dn, dn, dn, dn], oy = [Bs, si, Ma, jn, zs, dn, zs, dn], ly = [si, si, jn, jn, dn, dn, dn, dn], uy = [pl, pl, si, si, jn, jn, dn, dn], cy = [hh, pl, Bs, si, Bs, si, Bs, si], Te = { + DISPLAY: Dr[hh], + TEXT: Dr[Bs], + SCRIPT: Dr[Ma], + SCRIPTSCRIPT: Dr[zs] }, cc = [{ // Latin characters beyond the Latin-1 characters we have metrics for. // Needed for Czech, Hungarian and Turkish text, for example. @@ -862,20 +862,20 @@ var hh = 0, pl = 1, Bs = 2, sr = 3, Ma = 4, jn = 5, zs = 6, dn = 7, Di = [new hr name: "hangul", blocks: [[44032, 55215]] }]; -function hy(i) { +function hy(r) { for (var e = 0; e < cc.length; e++) for (var t = cc[e], n = 0; n < t.blocks.length; n++) { - var r = t.blocks[n]; - if (i >= r[0] && i <= r[1]) + var i = t.blocks[n]; + if (r >= i[0] && r <= i[1]) return t.name; } return null; } var nl = []; -cc.forEach((i) => i.blocks.forEach((e) => nl.push(...e))); -function dy(i) { +cc.forEach((r) => r.blocks.forEach((e) => nl.push(...e))); +function dy(r) { for (var e = 0; e < nl.length; e += 2) - if (i >= nl[e] && i <= nl[e + 1]) + if (r >= nl[e] && r <= nl[e + 1]) return !0; return !1; } @@ -940,35 +940,35 @@ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,1 var t = e / 2; return "M400000 " + e + " H0 L" + t + " 0 l65 45 L145 " + (e - 80) + " H400000z"; }, yy = function(e, t, n) { - var r = n - 54 - t - e; + var i = n - 54 - t - e; return "M702 " + (e + t) + "H400000" + (40 + e) + ` -H742v` + r + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +H742v` + i + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 ` + t + "H400000v" + (40 + e) + "H742z"; }, by = function(e, t, n) { t = 1e3 * t; - var r = ""; + var i = ""; switch (e) { case "sqrtMain": - r = fy(t, bs); + i = fy(t, bs); break; case "sqrtSize1": - r = my(t, bs); + i = my(t, bs); break; case "sqrtSize2": - r = gy(t, bs); + i = gy(t, bs); break; case "sqrtSize3": - r = py(t, bs); + i = py(t, bs); break; case "sqrtSize4": - r = _y(t, bs); + i = _y(t, bs); break; case "sqrtTall": - r = yy(t, bs, n); + i = yy(t, bs, n); } - return r; + return i; }, Ey = function(e, t) { switch (e) { case "⎜": @@ -1327,7 +1327,7 @@ class Za { return this.children.map(e).join(""); } } -var rr = { +var ii = { "AMS-Regular": { 32: [0, 0, 0, 0, 0.25], 65: [0, 0.68889, 0, 0, 0.72222], @@ -3476,17 +3476,17 @@ var rr = { ю: "m", я: "r" }; -function dh(i, e, t) { - if (!rr[e]) +function dh(r, e, t) { + if (!ii[e]) throw new Error("Font metrics not found for font: " + e + "."); - var n = i.charCodeAt(0), r = rr[e][n]; - if (!r && i[0] in Od && (n = Od[i[0]].charCodeAt(0), r = rr[e][n]), !r && t === "text" && dy(n) && (r = rr[e][77]), r) + var n = r.charCodeAt(0), i = ii[e][n]; + if (!i && r[0] in Od && (n = Od[r[0]].charCodeAt(0), i = ii[e][n]), !i && t === "text" && dy(n) && (i = ii[e][77]), i) return { - depth: r[0], - height: r[1], - italic: r[2], - skew: r[3], - width: r[4] + depth: i[0], + height: i[1], + italic: i[2], + skew: i[3], + width: i[4] }; } var hc = { @@ -3530,42 +3530,42 @@ var hc = { else if (e.unit === "mu") n = t.fontMetrics().cssEmPerMu; else { - var r; - if (t.style.isTight() ? r = t.havingStyle(t.style.text()) : r = t, e.unit === "ex") - n = r.fontMetrics().xHeight; + var i; + if (t.style.isTight() ? i = t.havingStyle(t.style.text()) : i = t, e.unit === "ex") + n = i.fontMetrics().xHeight; else if (e.unit === "em") - n = r.fontMetrics().quad; + n = i.fontMetrics().quad; else throw new ve("Invalid unit: '" + e.unit + "'"); - r !== t && (n *= r.sizeMultiplier / t.sizeMultiplier); + i !== t && (n *= i.sizeMultiplier / t.sizeMultiplier); } return Math.min(e.number * n, t.maxSize); }, ae = function(e) { return +e.toFixed(4) + "em"; -}, xr = function(e) { +}, xi = function(e) { return e.filter((t) => t).join(" "); }, bp = function(e, t, n) { if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = n || {}, t) { t.style.isTight() && this.classes.push("mtight"); - var r = t.getColor(); - r && (this.style.color = r); + var i = t.getColor(); + i && (this.style.color = i); } }, Ep = function(e) { var t = document.createElement(e); - t.className = xr(this.classes); + t.className = xi(this.classes); for (var n in this.style) this.style.hasOwnProperty(n) && (t.style[n] = this.style[n]); - for (var r in this.attributes) - this.attributes.hasOwnProperty(r) && t.setAttribute(r, this.attributes[r]); + for (var i in this.attributes) + this.attributes.hasOwnProperty(i) && t.setAttribute(i, this.attributes[i]); for (var s = 0; s < this.children.length; s++) t.appendChild(this.children[s].toNode()); return t; }, xy = /[\s"'>/=\x00-\x1f]/, Sp = function(e) { var t = "<" + e; - this.classes.length && (t += ' class="' + ze.escape(xr(this.classes)) + '"'); + this.classes.length && (t += ' class="' + ze.escape(xi(this.classes)) + '"'); var n = ""; - for (var r in this.style) - this.style.hasOwnProperty(r) && (n += ze.hyphenate(r) + ":" + this.style[r] + ";"); + for (var i in this.style) + this.style.hasOwnProperty(i) && (n += ze.hyphenate(i) + ":" + this.style[i] + ";"); n && (t += ' style="' + ze.escape(n) + '"'); for (var s in this.attributes) if (this.attributes.hasOwnProperty(s)) { @@ -3579,8 +3579,8 @@ var hc = { return t += "", t; }; class l0 { - constructor(e, t, n, r) { - this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, bp.call(this, e, n, r), this.children = t || []; + constructor(e, t, n, i) { + this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, bp.call(this, e, n, i), this.children = t || []; } /** * Sets an arbitrary attribute on the span. Warning: use this wisely. Not @@ -3601,8 +3601,8 @@ class l0 { } } class Tp { - constructor(e, t, n, r) { - this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, bp.call(this, t, r), this.children = n || [], this.setAttribute("href", e); + constructor(e, t, n, i) { + this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, bp.call(this, t, i), this.children = n || [], this.setAttribute("href", e); } setAttribute(e, t) { this.attributes[e] = t; @@ -3645,9 +3645,9 @@ var Dy = { // 'ī': '\u0131\u0304', // enable when we add Extended Latin ì: "ı̀" }; -class Ui { - constructor(e, t, n, r, s, a, o, l) { - this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = n || 0, this.italic = r || 0, this.skew = s || 0, this.width = a || 0, this.classes = o || [], this.style = l || {}, this.maxFontSize = 0; +class Ur { + constructor(e, t, n, i, s, a, o, l) { + this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = n || 0, this.italic = i || 0, this.skew = s || 0, this.width = a || 0, this.classes = o || [], this.style = l || {}, this.maxFontSize = 0; var u = hy(this.text.charCodeAt(0)); u && this.classes.push(u + "_fallback"), /[îïíì]/.test(this.text) && (this.text = Dy[this.text]); } @@ -3660,7 +3660,7 @@ class Ui { */ toNode() { var e = document.createTextNode(this.text), t = null; - this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = ae(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = xr(this.classes)); + this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = ae(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = xi(this.classes)); for (var n in this.style) this.style.hasOwnProperty(n) && (t = t || document.createElement("span"), t.style[n] = this.style[n]); return t ? (t.appendChild(e), t) : e; @@ -3670,17 +3670,17 @@ class Ui { */ toMarkup() { var e = !1, t = " 0 && (n += "margin-right:" + this.italic + "em;"); - for (var r in this.style) - this.style.hasOwnProperty(r) && (n += ze.hyphenate(r) + ":" + this.style[r] + ";"); + for (var i in this.style) + this.style.hasOwnProperty(i) && (n += ze.hyphenate(i) + ":" + this.style[i] + ";"); n && (e = !0, t += ' style="' + ze.escape(n) + '"'); var s = ze.escape(this.text); return e ? (t += ">", t += s, t += "", t) : s; } } -class wr { +class wi { constructor(e, t) { this.children = void 0, this.attributes = void 0, this.children = e || [], this.attributes = t || {}; } @@ -3688,8 +3688,8 @@ class wr { var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "svg"); for (var n in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, n) && t.setAttribute(n, this.attributes[n]); - for (var r = 0; r < this.children.length; r++) - t.appendChild(this.children[r].toNode()); + for (var i = 0; i < this.children.length; i++) + t.appendChild(this.children[i].toNode()); return t; } toMarkup() { @@ -3731,15 +3731,15 @@ class Bd { return e += "/>", e; } } -function Nd(i) { - if (i instanceof Ui) - return i; - throw new Error("Expected symbolNode but got " + String(i) + "."); +function Nd(r) { + if (r instanceof Ur) + return r; + throw new Error("Expected symbolNode but got " + String(r) + "."); } -function ky(i) { - if (i instanceof l0) - return i; - throw new Error("Expected span but got " + String(i) + "."); +function ky(r) { + if (r instanceof l0) + return r; + throw new Error("Expected span but got " + String(r) + "."); } var Iy = { "accent-token": 1, @@ -3751,14 +3751,14 @@ var Iy = { math: {}, text: {} }; -function _(i, e, t, n, r, s) { - xt[i][r] = { +function _(r, e, t, n, i, s) { + xt[r][i] = { font: e, group: t, replace: n - }, s && n && (xt[i][n] = xt[i][r]); + }, s && n && (xt[r][n] = xt[r][i]); } -var E = "math", te = "text", x = "main", C = "ams", lt = "accent-token", ue = "bin", pn = "close", ta = "inner", Se = "mathord", Lt = "op-token", Nn = "open", u0 = "punct", F = "rel", lr = "spacing", N = "textord"; +var E = "math", te = "text", x = "main", C = "ams", lt = "accent-token", ue = "bin", pn = "close", ta = "inner", Se = "mathord", Lt = "op-token", Nn = "open", u0 = "punct", F = "rel", li = "spacing", N = "textord"; _(E, x, F, "≡", "\\equiv", !0); _(E, x, F, "≺", "\\prec", !0); _(E, x, F, "≻", "\\succ", !0); @@ -4202,15 +4202,15 @@ _(E, x, F, "→", "\\rightarrow", !0); _(E, x, F, "→", "\\to"); _(E, C, F, "≱", "\\ngeq", !0); _(E, C, F, "≰", "\\nleq", !0); -_(E, x, lr, " ", "\\ "); -_(E, x, lr, " ", "\\space"); -_(E, x, lr, " ", "\\nobreakspace"); -_(te, x, lr, " ", "\\ "); -_(te, x, lr, " ", " "); -_(te, x, lr, " ", "\\space"); -_(te, x, lr, " ", "\\nobreakspace"); -_(E, x, lr, null, "\\nobreak"); -_(E, x, lr, null, "\\allowbreak"); +_(E, x, li, " ", "\\ "); +_(E, x, li, " ", "\\space"); +_(E, x, li, " ", "\\nobreakspace"); +_(te, x, li, " ", "\\ "); +_(te, x, li, " ", " "); +_(te, x, li, " ", "\\space"); +_(te, x, li, " ", "\\nobreakspace"); +_(E, x, li, null, "\\nobreak"); +_(E, x, li, null, "\\allowbreak"); _(E, x, u0, ",", ","); _(E, x, u0, ";", ";"); _(E, C, ue, "⊼", "\\barwedge", !0); @@ -4396,9 +4396,9 @@ for (var on = 0; on < _l.length; on++) { Ae = "𝕜"; _(E, x, Se, "k", Ae); _(te, x, N, "k", Ae); -for (var Nr = 0; Nr < 10; Nr++) { - var dr = Nr.toString(); - Ae = String.fromCharCode(55349, 57294 + Nr), _(E, x, Se, dr, Ae), _(te, x, N, dr, Ae), Ae = String.fromCharCode(55349, 57314 + Nr), _(E, x, Se, dr, Ae), _(te, x, N, dr, Ae), Ae = String.fromCharCode(55349, 57324 + Nr), _(E, x, Se, dr, Ae), _(te, x, N, dr, Ae), Ae = String.fromCharCode(55349, 57334 + Nr), _(E, x, Se, dr, Ae), _(te, x, N, dr, Ae); +for (var Ni = 0; Ni < 10; Ni++) { + var di = Ni.toString(); + Ae = String.fromCharCode(55349, 57294 + Ni), _(E, x, Se, di, Ae), _(te, x, N, di, Ae), Ae = String.fromCharCode(55349, 57314 + Ni), _(E, x, Se, di, Ae), _(te, x, N, di, Ae), Ae = String.fromCharCode(55349, 57324 + Ni), _(E, x, Se, di, Ae), _(te, x, N, di, Ae), Ae = String.fromCharCode(55349, 57334 + Ni), _(E, x, Se, di, Ae), _(te, x, N, di, Ae); } var zd = "ÐÞþ"; for (var B0 = 0; B0 < zd.length; B0++) { @@ -4473,7 +4473,7 @@ var _o = [ ["mathtt", "texttt", "Typewriter-Regular"] // 0-9 monospace ], Ly = function(e, t) { - var n = e.charCodeAt(0), r = e.charCodeAt(1), s = (n - 55296) * 1024 + (r - 56320) + 65536, a = t === "math" ? 0 : 1; + var n = e.charCodeAt(0), i = e.charCodeAt(1), s = (n - 55296) * 1024 + (i - 56320) + 65536, a = t === "math" ? 0 : 1; if (119808 <= s && s < 120484) { var o = Math.floor((s - 119808) / 26); return [_o[o][2], _o[o][a]]; @@ -4492,24 +4492,24 @@ var _o = [ value: e, metrics: dh(e, t, n) }; -}, fi = function(e, t, n, r, s) { +}, fr = function(e, t, n, i, s) { var a = c0(e, t, n), o = a.metrics; e = a.value; var l; if (o) { var u = o.italic; - (n === "text" || r && r.font === "mathit") && (u = 0), l = new Ui(e, o.height, o.depth, u, o.skew, o.width, s); + (n === "text" || i && i.font === "mathit") && (u = 0), l = new Ur(e, o.height, o.depth, u, o.skew, o.width, s); } else - typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + n + "'")), l = new Ui(e, 0, 0, 0, 0, 0, s); - if (r) { - l.maxFontSize = r.sizeMultiplier, r.style.isTight() && l.classes.push("mtight"); - var c = r.getColor(); + typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + n + "'")), l = new Ur(e, 0, 0, 0, 0, 0, s); + if (i) { + l.maxFontSize = i.sizeMultiplier, i.style.isTight() && l.classes.push("mtight"); + var c = i.getColor(); c && (l.style.color = c); } return l; -}, Ry = function(e, t, n, r) { - return r === void 0 && (r = []), n.font === "boldsymbol" && c0(e, "Main-Bold", t).metrics ? fi(e, "Main-Bold", t, n, r.concat(["mathbf"])) : e === "\\" || xt[t][e].font === "main" ? fi(e, "Main-Regular", t, n, r) : fi(e, "AMS-Regular", t, n, r.concat(["amsrm"])); -}, Cy = function(e, t, n, r, s) { +}, Ry = function(e, t, n, i) { + return i === void 0 && (i = []), n.font === "boldsymbol" && c0(e, "Main-Bold", t).metrics ? fr(e, "Main-Bold", t, n, i.concat(["mathbf"])) : e === "\\" || xt[t][e].font === "main" ? fr(e, "Main-Regular", t, n, i) : fr(e, "AMS-Regular", t, n, i.concat(["amsrm"])); +}, Cy = function(e, t, n, i, s) { return s !== "textord" && c0(e, "Math-BoldItalic", t).metrics ? { fontName: "Math-BoldItalic", fontClass: "boldsymbol" @@ -4518,74 +4518,74 @@ var _o = [ fontClass: "mathbf" }; }, Fy = function(e, t, n) { - var r = e.mode, s = e.text, a = ["mord"], o = r === "math" || r === "text" && t.font, l = o ? t.font : t.fontFamily, u = "", c = ""; - if (s.charCodeAt(0) === 55349 && ([u, c] = Ly(s, r)), u.length > 0) - return fi(s, u, r, t, a.concat(c)); + var i = e.mode, s = e.text, a = ["mord"], o = i === "math" || i === "text" && t.font, l = o ? t.font : t.fontFamily, u = "", c = ""; + if (s.charCodeAt(0) === 55349 && ([u, c] = Ly(s, i)), u.length > 0) + return fr(s, u, i, t, a.concat(c)); if (l) { var h, d; if (l === "boldsymbol") { - var f = Cy(s, r, t, a, n); + var f = Cy(s, i, t, a, n); h = f.fontName, d = [f.fontClass]; } else o ? (h = Dp[l].fontName, d = [l]) : (h = vo(l, t.fontWeight, t.fontShape), d = [l, t.fontWeight, t.fontShape]); - if (c0(s, h, r).metrics) - return fi(s, h, r, t, a.concat(d)); + if (c0(s, h, i).metrics) + return fr(s, h, i, t, a.concat(d)); if (Ap.hasOwnProperty(s) && h.slice(0, 10) === "Typewriter") { for (var m = [], g = 0; g < s.length; g++) - m.push(fi(s[g], h, r, t, a.concat(d))); + m.push(fr(s[g], h, i, t, a.concat(d))); return wp(m); } } if (n === "mathord") - return fi(s, "Math-Italic", r, t, a.concat(["mathnormal"])); + return fr(s, "Math-Italic", i, t, a.concat(["mathnormal"])); if (n === "textord") { - var p = xt[r][s] && xt[r][s].font; + var p = xt[i][s] && xt[i][s].font; if (p === "ams") { var b = vo("amsrm", t.fontWeight, t.fontShape); - return fi(s, b, r, t, a.concat("amsrm", t.fontWeight, t.fontShape)); + return fr(s, b, i, t, a.concat("amsrm", t.fontWeight, t.fontShape)); } else if (p === "main" || !p) { var y = vo("textrm", t.fontWeight, t.fontShape); - return fi(s, y, r, t, a.concat(t.fontWeight, t.fontShape)); + return fr(s, y, i, t, a.concat(t.fontWeight, t.fontShape)); } else { var v = vo(p, t.fontWeight, t.fontShape); - return fi(s, v, r, t, a.concat(v, t.fontWeight, t.fontShape)); + return fr(s, v, i, t, a.concat(v, t.fontWeight, t.fontShape)); } } else throw new Error("unexpected type: " + n + " in makeOrd"); -}, Py = (i, e) => { - if (xr(i.classes) !== xr(e.classes) || i.skew !== e.skew || i.maxFontSize !== e.maxFontSize) +}, Py = (r, e) => { + if (xi(r.classes) !== xi(e.classes) || r.skew !== e.skew || r.maxFontSize !== e.maxFontSize) return !1; - if (i.classes.length === 1) { - var t = i.classes[0]; + if (r.classes.length === 1) { + var t = r.classes[0]; if (t === "mbin" || t === "mord") return !1; } - for (var n in i.style) - if (i.style.hasOwnProperty(n) && i.style[n] !== e.style[n]) + for (var n in r.style) + if (r.style.hasOwnProperty(n) && r.style[n] !== e.style[n]) return !1; - for (var r in e.style) - if (e.style.hasOwnProperty(r) && i.style[r] !== e.style[r]) + for (var i in e.style) + if (e.style.hasOwnProperty(i) && r.style[i] !== e.style[i]) return !1; return !0; -}, My = (i) => { - for (var e = 0; e < i.length - 1; e++) { - var t = i[e], n = i[e + 1]; - t instanceof Ui && n instanceof Ui && Py(t, n) && (t.text += n.text, t.height = Math.max(t.height, n.height), t.depth = Math.max(t.depth, n.depth), t.italic = n.italic, i.splice(e + 1, 1), e--); +}, My = (r) => { + for (var e = 0; e < r.length - 1; e++) { + var t = r[e], n = r[e + 1]; + t instanceof Ur && n instanceof Ur && Py(t, n) && (t.text += n.text, t.height = Math.max(t.height, n.height), t.depth = Math.max(t.depth, n.depth), t.italic = n.italic, r.splice(e + 1, 1), e--); } - return i; + return r; }, fh = function(e) { - for (var t = 0, n = 0, r = 0, s = 0; s < e.children.length; s++) { + for (var t = 0, n = 0, i = 0, s = 0; s < e.children.length; s++) { var a = e.children[s]; - a.height > t && (t = a.height), a.depth > n && (n = a.depth), a.maxFontSize > r && (r = a.maxFontSize); + a.height > t && (t = a.height), a.depth > n && (n = a.depth), a.maxFontSize > i && (i = a.maxFontSize); } - e.height = t, e.depth = n, e.maxFontSize = r; -}, En = function(e, t, n, r) { - var s = new l0(e, t, n, r); + e.height = t, e.depth = n, e.maxFontSize = i; +}, En = function(e, t, n, i) { + var s = new l0(e, t, n, i); return fh(s), s; -}, xp = (i, e, t, n) => new l0(i, e, t, n), Oy = function(e, t, n) { - var r = En([e], [], t); - return r.height = Math.max(n || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), r.style.borderBottomWidth = ae(r.height), r.maxFontSize = 1, r; -}, By = function(e, t, n, r) { - var s = new Tp(e, t, n, r); +}, xp = (r, e, t, n) => new l0(r, e, t, n), Oy = function(e, t, n) { + var i = En([e], [], t); + return i.height = Math.max(n || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), i.style.borderBottomWidth = ae(i.height), i.maxFontSize = 1, i; +}, By = function(e, t, n, i) { + var s = new Tp(e, t, n, i); return fh(s), s; }, wp = function(e) { var t = new Za(e); @@ -4594,7 +4594,7 @@ var _o = [ return e instanceof Za ? En([], [e], t) : e; }, $y = function(e) { if (e.positionType === "individualShift") { - for (var t = e.children, n = [t[0]], r = -t[0].shift - t[0].elem.depth, s = r, a = 1; a < t.length; a++) { + for (var t = e.children, n = [t[0]], i = -t[0].shift - t[0].elem.depth, s = i, a = 1; a < t.length; a++) { var o = -t[a].shift - s - t[a].elem.depth, l = o - (t[a - 1].elem.height + t[a - 1].elem.depth); s = s + o, n.push({ type: "kern", @@ -4603,7 +4603,7 @@ var _o = [ } return { children: n, - depth: r + depth: i }; } var u; @@ -4633,7 +4633,7 @@ var _o = [ }, Uy = function(e, t) { for (var { children: n, - depth: r + depth: i } = $y(e), s = 0, a = 0; a < n.length; a++) { var o = n[a]; if (o.type === "elem") { @@ -4644,7 +4644,7 @@ var _o = [ s += 2; var u = En(["pstrut"], []); u.style.height = ae(s); - for (var c = [], h = r, d = r, f = r, m = 0; m < n.length; m++) { + for (var c = [], h = i, d = i, f = i, m = 0; m < n.length; m++) { var g = n[m]; if (g.type === "kern") f += g.size; @@ -4660,35 +4660,35 @@ var _o = [ if (h < 0) { var w = En([], []), D = En(["vlist"], [w]); D.style.height = ae(-h); - var L = En(["vlist-s"], [new Ui("​")]); + var L = En(["vlist-s"], [new Ur("​")]); A = [En(["vlist-r"], [T, L]), En(["vlist-r"], [D])]; } else A = [En(["vlist-r"], [T])]; var I = En(["vlist-t"], A); return A.length === 2 && I.classes.push("vlist-t2"), I.height = d, I.depth = -h, I; -}, Hy = (i, e) => { - var t = En(["mspace"], [], e), n = ht(i, e); +}, Hy = (r, e) => { + var t = En(["mspace"], [], e), n = ht(r, e); return t.style.marginRight = ae(n), t; }, vo = function(e, t, n) { - var r = ""; + var i = ""; switch (e) { case "amsrm": - r = "AMS"; + i = "AMS"; break; case "textrm": - r = "Main"; + i = "Main"; break; case "textsf": - r = "SansSerif"; + i = "SansSerif"; break; case "texttt": - r = "Typewriter"; + i = "Typewriter"; break; default: - r = e; + i = e; } var s; - return t === "textbf" && n === "textit" ? s = "BoldItalic" : t === "textbf" ? s = "Bold" : t === "textit" ? s = "Italic" : s = "Regular", r + "-" + s; + return t === "textbf" && n === "textit" ? s = "BoldItalic" : t === "textbf" ? s = "Bold" : t === "textit" ? s = "Italic" : s = "Regular", i + "-" + s; }, Dp = { // styles mathbf: { @@ -4753,18 +4753,18 @@ var _o = [ oiiintSize1: ["oiiintSize1", 1.304, 0.499], oiiintSize2: ["oiiintSize2", 1.98, 0.659] }, Gy = function(e, t) { - var [n, r, s] = kp[e], a = new ns(n), o = new wr([a], { - width: ae(r), + var [n, i, s] = kp[e], a = new ns(n), o = new wi([a], { + width: ae(i), height: ae(s), // Override CSS rule `.katex svg { width: 100% }` - style: "width:" + ae(r), - viewBox: "0 0 " + 1e3 * r + " " + 1e3 * s, + style: "width:" + ae(i), + viewBox: "0 0 " + 1e3 * i + " " + 1e3 * s, preserveAspectRatio: "xMinYMin" }), l = xp(["overlay"], [o], t); - return l.height = s, l.style.height = ae(s), l.style.width = ae(r), l; + return l.height = s, l.style.height = ae(s), l.style.width = ae(i), l; }, z = { fontMap: Dp, - makeSymbol: fi, + makeSymbol: fr, mathsym: Ry, makeSpan: En, makeSvgSpan: xp, @@ -4781,48 +4781,48 @@ var _o = [ }, ut = { number: 3, unit: "mu" -}, $r = { +}, $i = { number: 4, unit: "mu" -}, Yi = { +}, Yr = { number: 5, unit: "mu" }, zy = { mord: { mop: ut, - mbin: $r, - mrel: Yi, + mbin: $i, + mrel: Yr, minner: ut }, mop: { mord: ut, mop: ut, - mrel: Yi, + mrel: Yr, minner: ut }, mbin: { - mord: $r, - mop: $r, - mopen: $r, - minner: $r + mord: $i, + mop: $i, + mopen: $i, + minner: $i }, mrel: { - mord: Yi, - mop: Yi, - mopen: Yi, - minner: Yi + mord: Yr, + mop: Yr, + mopen: Yr, + minner: Yr }, mopen: {}, mclose: { mop: ut, - mbin: $r, - mrel: Yi, + mbin: $i, + mrel: Yr, minner: ut }, mpunct: { mord: ut, mop: ut, - mrel: Yi, + mrel: Yr, mopen: ut, mclose: ut, mpunct: ut, @@ -4831,8 +4831,8 @@ var _o = [ minner: { mord: ut, mop: ut, - mbin: $r, - mrel: Yi, + mbin: $i, + mrel: Yr, mopen: ut, mpunct: ut, minner: ut @@ -4856,15 +4856,15 @@ var _o = [ mop: ut } }, Ip = {}, vl = {}, yl = {}; -function le(i) { +function le(r) { for (var { type: e, names: t, props: n, - handler: r, + handler: i, htmlBuilder: s, mathmlBuilder: a - } = i, o = { + } = r, o = { type: e, numArgs: n.numArgs, argTypes: n.argTypes, @@ -4874,17 +4874,17 @@ function le(i) { numOptionalArgs: n.numOptionalArgs || 0, infix: !!n.infix, primitive: !!n.primitive, - handler: r + handler: i }, l = 0; l < t.length; ++l) Ip[t[l]] = o; e && (s && (vl[e] = s), a && (yl[e] = a)); } -function fs(i) { +function fs(r) { var { type: e, htmlBuilder: t, mathmlBuilder: n - } = i; + } = r; le({ type: e, names: [], @@ -4916,8 +4916,8 @@ var bl = function(e) { mclose: "mclose", mpunct: "mpunct", minner: "minner" -}, Wt = function(e, t, n, r) { - r === void 0 && (r = [null, null]); +}, Wt = function(e, t, n, i) { + i === void 0 && (i = [null, null]); for (var s = [], a = 0; a < e.length; a++) { var o = Ge(e[a], t); if (o instanceof Za) { @@ -4933,7 +4933,7 @@ var bl = function(e) { var c = e[0]; c.type === "sizing" ? u = t.havingSize(c.size) : c.type === "styling" && (u = t.havingStyle(jy[c.style])); } - var h = qs([r[0] || "leftmost"], [], t), d = qs([r[1] || "rightmost"], [], t), f = n === "root"; + var h = qs([i[0] || "leftmost"], [], t), d = qs([i[1] || "rightmost"], [], t), f = n === "root"; return Vd(s, (m, g) => { var p = g.classes[0], b = m.classes[0]; p === "mbin" && Ky.includes(b) ? g.classes[0] = "mord" : b === "mbin" && Vy.includes(p) && (m.classes[0] = "mord"); @@ -4946,12 +4946,12 @@ var bl = function(e) { }, { node: h }, d, f), s; -}, Vd = function i(e, t, n, r, s) { - r && e.push(r); +}, Vd = function r(e, t, n, i, s) { + i && e.push(i); for (var a = 0; a < e.length; a++) { var o = e[a], l = Lp(o); if (l) { - i(l.children, t, n, null, s); + r(l.children, t, n, null, s); continue; } var u = !o.hasClass("mspace"); @@ -4963,18 +4963,18 @@ var bl = function(e) { e.splice(h + 1, 0, d), a++; })(a); } - r && e.pop(); + i && e.pop(); }, Lp = function(e) { return e instanceof Za || e instanceof Tp || e instanceof l0 && e.hasClass("enclosing") ? e : null; -}, Yy = function i(e, t) { +}, Yy = function r(e, t) { var n = Lp(e); if (n) { - var r = n.children; - if (r.length) { + var i = n.children; + if (i.length) { if (t === "right") - return i(r[r.length - 1], "right"); + return r(i[i.length - 1], "right"); if (t === "left") - return i(r[0], "left"); + return r(i[0], "left"); } } return e; @@ -4987,18 +4987,18 @@ var bl = function(e) { if (!e) return qs(); if (vl[e.type]) { - var r = vl[e.type](e, t); + var i = vl[e.type](e, t); if (n && t.size !== n.size) { - r = qs(t.sizingClasses(n), [r], t); + i = qs(t.sizingClasses(n), [i], t); var s = t.sizeMultiplier / n.sizeMultiplier; - r.height *= s, r.depth *= s; + i.height *= s, i.depth *= s; } - return r; + return i; } else throw new ve("Got group of unknown type: '" + e.type + "'"); }; -function Rp(i) { - return new Za(i); +function Rp(r) { + return new Za(r); } class Kn { constructor(e, t, n) { @@ -5024,12 +5024,12 @@ class Kn { var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type); for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]); - this.classes.length > 0 && (e.className = xr(this.classes)); + this.classes.length > 0 && (e.className = xi(this.classes)); for (var n = 0; n < this.children.length; n++) - if (this.children[n] instanceof Li && this.children[n + 1] instanceof Li) { - for (var r = this.children[n].toText() + this.children[++n].toText(); this.children[n + 1] instanceof Li; ) - r += this.children[++n].toText(); - e.appendChild(new Li(r).toNode()); + if (this.children[n] instanceof Lr && this.children[n + 1] instanceof Lr) { + for (var i = this.children[n].toText() + this.children[++n].toText(); this.children[n + 1] instanceof Lr; ) + i += this.children[++n].toText(); + e.appendChild(new Lr(i).toNode()); } else e.appendChild(this.children[n].toNode()); return e; @@ -5041,7 +5041,7 @@ class Kn { var e = "<" + this.type; for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += ze.escape(this.attributes[t]), e += '"'); - this.classes.length > 0 && (e += ' class ="' + ze.escape(xr(this.classes)) + '"'), e += ">"; + this.classes.length > 0 && (e += ' class ="' + ze.escape(xi(this.classes)) + '"'), e += ">"; for (var n = 0; n < this.children.length; n++) e += this.children[n].toMarkup(); return e += "", e; @@ -5053,7 +5053,7 @@ class Kn { return this.children.map((e) => e.toText()).join(""); } } -class Li { +class Lr { constructor(e) { this.text = void 0, this.text = e; } @@ -5107,15 +5107,15 @@ class Xy { return this.character ? this.character : " "; } } -var ie = { +var re = { MathNode: Kn, - TextNode: Li, + TextNode: Lr, SpaceNode: Xy, newDocumentFragment: Rp }, Qn = function(e, t, n) { - return xt[t][e] && xt[t][e].replace && e.charCodeAt(0) !== 55349 && !(Ap.hasOwnProperty(e) && n && (n.fontFamily && n.fontFamily.slice(4, 6) === "tt" || n.font && n.font.slice(4, 6) === "tt")) && (e = xt[t][e].replace), new ie.TextNode(e); + return xt[t][e] && xt[t][e].replace && e.charCodeAt(0) !== 55349 && !(Ap.hasOwnProperty(e) && n && (n.fontFamily && n.fontFamily.slice(4, 6) === "tt" || n.font && n.font.slice(4, 6) === "tt")) && (e = xt[t][e].replace), new re.TextNode(e); }, mh = function(e) { - return e.length === 1 ? e[0] : new ie.MathNode("mrow", e); + return e.length === 1 ? e[0] : new re.MathNode("mrow", e); }, gh = function(e, t) { if (t.fontFamily === "texttt") return "monospace"; @@ -5130,7 +5130,7 @@ var ie = { var n = t.font; if (!n || n === "mathnormal") return null; - var r = e.mode; + var i = e.mode; if (n === "mathit") return "italic"; if (n === "boldsymbol") @@ -5152,26 +5152,26 @@ var ie = { var s = e.text; if (["\\imath", "\\jmath"].includes(s)) return null; - xt[r][s] && xt[r][s].replace && (s = xt[r][s].replace); + xt[i][s] && xt[i][s].replace && (s = xt[i][s].replace); var a = z.fontMap[n].fontName; - return dh(s, a, r) ? z.fontMap[n].variant : null; + return dh(s, a, i) ? z.fontMap[n].variant : null; }; -function N0(i) { - if (!i) +function N0(r) { + if (!r) return !1; - if (i.type === "mi" && i.children.length === 1) { - var e = i.children[0]; - return e instanceof Li && e.text === "."; - } else if (i.type === "mo" && i.children.length === 1 && i.getAttribute("separator") === "true" && i.getAttribute("lspace") === "0em" && i.getAttribute("rspace") === "0em") { - var t = i.children[0]; - return t instanceof Li && t.text === ","; + if (r.type === "mi" && r.children.length === 1) { + var e = r.children[0]; + return e instanceof Lr && e.text === "."; + } else if (r.type === "mo" && r.children.length === 1 && r.getAttribute("separator") === "true" && r.getAttribute("lspace") === "0em" && r.getAttribute("rspace") === "0em") { + var t = r.children[0]; + return t instanceof Lr && t.text === ","; } else return !1; } var $n = function(e, t, n) { if (e.length === 1) { - var r = tt(e[0], t); - return n && r instanceof Kn && r.type === "mo" && (r.setAttribute("lspace", "0em"), r.setAttribute("rspace", "0em")), [r]; + var i = tt(e[0], t); + return n && i instanceof Kn && i.type === "mo" && (i.setAttribute("lspace", "0em"), i.setAttribute("rspace", "0em")), [i]; } for (var s = [], a, o = 0; o < e.length; o++) { var l = tt(e[o], t); @@ -5192,20 +5192,20 @@ var $n = function(e, t, n) { u instanceof Kn && u.type === "mn" && (u.children = [...a.children, ...u.children], s.pop()); } else if (a.type === "mi" && a.children.length === 1) { var c = a.children[0]; - if (c instanceof Li && c.text === "̸" && (l.type === "mo" || l.type === "mi" || l.type === "mn")) { + if (c instanceof Lr && c.text === "̸" && (l.type === "mo" || l.type === "mi" || l.type === "mn")) { var h = l.children[0]; - h instanceof Li && h.text.length > 0 && (h.text = h.text.slice(0, 1) + "̸" + h.text.slice(1), s.pop()); + h instanceof Lr && h.text.length > 0 && (h.text = h.text.slice(0, 1) + "̸" + h.text.slice(1), s.pop()); } } } s.push(l), a = l; } return s; -}, Dr = function(e, t, n) { +}, Di = function(e, t, n) { return mh($n(e, t, n)); }, tt = function(e, t) { if (!e) - return new ie.MathNode("mrow"); + return new re.MathNode("mrow"); if (yl[e.type]) { var n = yl[e.type](e, t); return n; @@ -5257,7 +5257,7 @@ var $n = function(e, t, n) { "\\cdleftarrow": "←", "\\cdlongequal": "=" }, Zy = function(e) { - var t = new ie.MathNode("mo", [new ie.TextNode(Qy[e.replace(/^\\/, "")])]); + var t = new re.MathNode("mo", [new re.TextNode(Qy[e.replace(/^\\/, "")])]); return t.setAttribute("stretchy", "true"), t; }, Jy = { // path(s), minWidth, height, align @@ -5319,7 +5319,7 @@ var $n = function(e, t, n) { var m = [1, 1, 2, 2, 3, 3][c]; l === "widehat" || l === "widecheck" ? (o = [0, 1062, 2364, 2364, 2364][m], h = [0, 239, 300, 360, 420][m], f = [0, 0.24, 0.3, 0.3, 0.36, 0.42][m], d = l + m) : (o = [0, 600, 1033, 2339, 2340][m], h = [0, 260, 286, 306, 312][m], f = [0, 0.26, 0.286, 0.3, 0.306, 0.34][m], d = "tilde" + m); } - var g = new ns(d), p = new wr([g], { + var g = new ns(d), p = new wi([g], { width: "100%", height: ae(f), viewBox: "0 0 " + o + " " + h, @@ -5343,7 +5343,7 @@ var $n = function(e, t, n) { throw new Error(`Correct katexImagesData or update code here to support ` + D + " children."); for (var M = 0; M < D; M++) { - var P = new ns(v[M]), V = new wr([P], { + var P = new ns(v[M]), V = new wi([P], { width: "400em", height: ae(w), viewBox: "0 0 " + o + " " + A, @@ -5365,13 +5365,13 @@ var $n = function(e, t, n) { } } var { - span: r, + span: i, minWidth: s, height: a } = n(); - return r.height = a, r.style.height = ae(a), s > 0 && (r.style.minWidth = ae(s)), r; -}, n3 = function(e, t, n, r, s) { - var a, o = e.height + e.depth + n + r; + return i.height = a, i.style.height = ae(a), s > 0 && (i.style.minWidth = ae(s)), i; +}, n3 = function(e, t, n, i, s) { + var a, o = e.height + e.depth + n + i; if (/fbox|color|angl/.test(t)) { if (a = z.makeSpan(["stretchy", t], [], s), t === "fbox") { var l = s.color && s.getColor(); @@ -5392,35 +5392,35 @@ var $n = function(e, t, n) { y2: "0", "stroke-width": "0.046em" })); - var c = new wr(u, { + var c = new wi(u, { width: "100%", height: ae(o) }); a = z.makeSvgSpan([], [c], s); } return a.height = o, a.style.height = ae(o), a; -}, or = { +}, oi = { encloseSpan: n3, mathMLnode: Zy, svgSpan: t3 }; -function Ce(i, e) { - if (!i || i.type !== e) - throw new Error("Expected node of type " + e + ", but got " + (i ? "node of type " + i.type : String(i))); - return i; +function Ce(r, e) { + if (!r || r.type !== e) + throw new Error("Expected node of type " + e + ", but got " + (r ? "node of type " + r.type : String(r))); + return r; } -function ph(i) { - var e = h0(i); +function ph(r) { + var e = h0(r); if (!e) - throw new Error("Expected node of symbol group type, but got " + (i ? "node of type " + i.type : String(i))); + throw new Error("Expected node of symbol group type, but got " + (r ? "node of type " + r.type : String(r))); return e; } -function h0(i) { - return i && (i.type === "atom" || Iy.hasOwnProperty(i.type)) ? i : null; +function h0(r) { + return r && (r.type === "atom" || Iy.hasOwnProperty(r.type)) ? r : null; } -var _h = (i, e) => { - var t, n, r; - i && i.type === "supsub" ? (n = Ce(i.base, "accent"), t = n.base, i.base = t, r = ky(Ge(i, e)), i.base = n) : (n = Ce(i, "accent"), t = n.base); +var _h = (r, e) => { + var t, n, i; + r && r.type === "supsub" ? (n = Ce(r.base, "accent"), t = n.base, r.base = t, i = ky(Ge(r, e)), r.base = n) : (n = Ce(r, "accent"), t = n.base); var s = Ge(t, e.havingCrampedStyle()), a = n.isShifty && ze.isCharacterBox(t), o = 0; if (a) { var l = ze.getBaseElem(t), u = Ge(l, e.havingCrampedStyle()); @@ -5428,7 +5428,7 @@ var _h = (i, e) => { } var c = n.label === "\\c", h = c ? s.height + s.depth : Math.min(s.height, e.fontMetrics().xHeight), d; if (n.isStretchy) - d = or.svgSpan(n, e), d = z.makeVList({ + d = oi.svgSpan(n, e), d = z.makeVList({ positionType: "firstBaseline", children: [{ type: "elem", @@ -5467,25 +5467,25 @@ var _h = (i, e) => { }, e); } var b = z.makeSpan(["mord", "accent"], [d], e); - return r ? (r.children[0] = b, r.height = Math.max(b.height, r.height), r.classes[0] = "mord", r) : b; -}, Cp = (i, e) => { - var t = i.isStretchy ? or.mathMLnode(i.label) : new ie.MathNode("mo", [Qn(i.label, i.mode)]), n = new ie.MathNode("mover", [tt(i.base, e), t]); + return i ? (i.children[0] = b, i.height = Math.max(b.height, i.height), i.classes[0] = "mord", i) : b; +}, Cp = (r, e) => { + var t = r.isStretchy ? oi.mathMLnode(r.label) : new re.MathNode("mo", [Qn(r.label, r.mode)]), n = new re.MathNode("mover", [tt(r.base, e), t]); return n.setAttribute("accent", "true"), n; -}, i3 = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((i) => "\\" + i).join("|")); +}, r3 = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((r) => "\\" + r).join("|")); le({ type: "accent", names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"], props: { numArgs: 1 }, - handler: (i, e) => { - var t = bl(e[0]), n = !i3.test(i.funcName), r = !n || i.funcName === "\\widehat" || i.funcName === "\\widetilde" || i.funcName === "\\widecheck"; + handler: (r, e) => { + var t = bl(e[0]), n = !r3.test(r.funcName), i = !n || r.funcName === "\\widehat" || r.funcName === "\\widetilde" || r.funcName === "\\widecheck"; return { type: "accent", - mode: i.parser.mode, - label: i.funcName, + mode: r.parser.mode, + label: r.funcName, isStretchy: n, - isShifty: r, + isShifty: i, base: t }; }, @@ -5502,12 +5502,12 @@ le({ // unless in strict mode argTypes: ["primitive"] }, - handler: (i, e) => { - var t = e[0], n = i.parser.mode; - return n === "math" && (i.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + i.funcName + " works only in text mode"), n = "text"), { + handler: (r, e) => { + var t = e[0], n = r.parser.mode; + return n === "math" && (r.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + r.funcName + " works only in text mode"), n = "text"), { type: "accent", mode: n, - label: i.funcName, + label: r.funcName, isStretchy: !1, isShifty: !0, base: t @@ -5522,20 +5522,20 @@ le({ props: { numArgs: 1 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = e[0]; + } = r, i = e[0]; return { type: "accentUnder", mode: t.mode, label: n, - base: r + base: i }; }, - htmlBuilder: (i, e) => { - var t = Ge(i.base, e), n = or.svgSpan(i, e), r = i.label === "\\utilde" ? 0.12 : 0, s = z.makeVList({ + htmlBuilder: (r, e) => { + var t = Ge(r.base, e), n = oi.svgSpan(r, e), i = r.label === "\\utilde" ? 0.12 : 0, s = z.makeVList({ positionType: "top", positionData: t.height, children: [{ @@ -5544,7 +5544,7 @@ le({ wrapperClasses: ["svg-align"] }, { type: "kern", - size: r + size: i }, { type: "elem", elem: t @@ -5552,13 +5552,13 @@ le({ }, e); return z.makeSpan(["mord", "accentunder"], [s], e); }, - mathmlBuilder: (i, e) => { - var t = or.mathMLnode(i.label), n = new ie.MathNode("munder", [tt(i.base, e), t]); + mathmlBuilder: (r, e) => { + var t = oi.mathMLnode(r.label), n = new re.MathNode("munder", [tt(r.base, e), t]); return n.setAttribute("accentunder", "true"), n; } }); -var yo = (i) => { - var e = new ie.MathNode("mpadded", i ? [i] : []); +var yo = (r) => { + var e = new re.MathNode("mpadded", r ? [r] : []); return e.setAttribute("width", "+0.6em"), e.setAttribute("lspace", "0.3em"), e; }; le({ @@ -5597,28 +5597,28 @@ le({ numArgs: 1, numOptionalArgs: 1 }, - handler(i, e, t) { + handler(r, e, t) { var { parser: n, - funcName: r - } = i; + funcName: i + } = r; return { type: "xArrow", mode: n.mode, - label: r, + label: i, body: e[0], below: t[0] }; }, // Flow is unable to correctly infer the type of `group`, even though it's // unambiguously determined from the passed-in `type` above. - htmlBuilder(i, e) { - var t = e.style, n = e.havingStyle(t.sup()), r = z.wrapFragment(Ge(i.body, n, e), e), s = i.label.slice(0, 2) === "\\x" ? "x" : "cd"; - r.classes.push(s + "-arrow-pad"); + htmlBuilder(r, e) { + var t = e.style, n = e.havingStyle(t.sup()), i = z.wrapFragment(Ge(r.body, n, e), e), s = r.label.slice(0, 2) === "\\x" ? "x" : "cd"; + i.classes.push(s + "-arrow-pad"); var a; - i.below && (n = e.havingStyle(t.sub()), a = z.wrapFragment(Ge(i.below, n, e), e), a.classes.push(s + "-arrow-pad")); - var o = or.svgSpan(i, e), l = -e.fontMetrics().axisHeight + 0.5 * o.height, u = -e.fontMetrics().axisHeight - 0.5 * o.height - 0.111; - (r.depth > 0.25 || i.label === "\\xleftequilibrium") && (u -= r.depth); + r.below && (n = e.havingStyle(t.sub()), a = z.wrapFragment(Ge(r.below, n, e), e), a.classes.push(s + "-arrow-pad")); + var o = oi.svgSpan(r, e), l = -e.fontMetrics().axisHeight + 0.5 * o.height, u = -e.fontMetrics().axisHeight - 0.5 * o.height - 0.111; + (i.depth > 0.25 || r.label === "\\xleftequilibrium") && (u -= i.depth); var c; if (a) { var h = -e.fontMetrics().axisHeight + a.height + 0.5 * o.height + 0.111; @@ -5626,7 +5626,7 @@ le({ positionType: "individualShift", children: [{ type: "elem", - elem: r, + elem: i, shift: u }, { type: "elem", @@ -5643,7 +5643,7 @@ le({ positionType: "individualShift", children: [{ type: "elem", - elem: r, + elem: i, shift: u }, { type: "elem", @@ -5653,33 +5653,33 @@ le({ }, e); return c.children[0].children[0].children[1].classes.push("svg-align"), z.makeSpan(["mrel", "x-arrow"], [c], e); }, - mathmlBuilder(i, e) { - var t = or.mathMLnode(i.label); - t.setAttribute("minsize", i.label.charAt(0) === "x" ? "1.75em" : "3.0em"); + mathmlBuilder(r, e) { + var t = oi.mathMLnode(r.label); + t.setAttribute("minsize", r.label.charAt(0) === "x" ? "1.75em" : "3.0em"); var n; - if (i.body) { - var r = yo(tt(i.body, e)); - if (i.below) { - var s = yo(tt(i.below, e)); - n = new ie.MathNode("munderover", [t, s, r]); + if (r.body) { + var i = yo(tt(r.body, e)); + if (r.below) { + var s = yo(tt(r.below, e)); + n = new re.MathNode("munderover", [t, s, i]); } else - n = new ie.MathNode("mover", [t, r]); - } else if (i.below) { - var a = yo(tt(i.below, e)); - n = new ie.MathNode("munder", [t, a]); + n = new re.MathNode("mover", [t, i]); + } else if (r.below) { + var a = yo(tt(r.below, e)); + n = new re.MathNode("munder", [t, a]); } else - n = yo(), n = new ie.MathNode("mover", [t, n]); + n = yo(), n = new re.MathNode("mover", [t, n]); return n; } }); -var r3 = z.makeSpan; -function Fp(i, e) { - var t = Wt(i.body, e, !0); - return r3([i.mclass], t, e); +var i3 = z.makeSpan; +function Fp(r, e) { + var t = Wt(r.body, e, !0); + return i3([r.mclass], t, e); } -function Pp(i, e) { - var t, n = $n(i.body, e); - return i.mclass === "minner" ? t = new ie.MathNode("mpadded", n) : i.mclass === "mord" ? i.isCharacterBox ? (t = n[0], t.type = "mi") : t = new ie.MathNode("mi", n) : (i.isCharacterBox ? (t = n[0], t.type = "mo") : t = new ie.MathNode("mo", n), i.mclass === "mbin" ? (t.attributes.lspace = "0.22em", t.attributes.rspace = "0.22em") : i.mclass === "mpunct" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0.17em") : i.mclass === "mopen" || i.mclass === "mclose" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0em") : i.mclass === "minner" && (t.attributes.lspace = "0.0556em", t.attributes.width = "+0.1111em")), t; +function Pp(r, e) { + var t, n = $n(r.body, e); + return r.mclass === "minner" ? t = new re.MathNode("mpadded", n) : r.mclass === "mord" ? r.isCharacterBox ? (t = n[0], t.type = "mi") : t = new re.MathNode("mi", n) : (r.isCharacterBox ? (t = n[0], t.type = "mo") : t = new re.MathNode("mo", n), r.mclass === "mbin" ? (t.attributes.lspace = "0.22em", t.attributes.rspace = "0.22em") : r.mclass === "mpunct" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0.17em") : r.mclass === "mopen" || r.mclass === "mclose" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0em") : r.mclass === "minner" && (t.attributes.lspace = "0.0556em", t.attributes.width = "+0.1111em")), t; } le({ type: "mclass", @@ -5688,25 +5688,25 @@ le({ numArgs: 1, primitive: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i, r = e[0]; + } = r, i = e[0]; return { type: "mclass", mode: t.mode, mclass: "m" + n.slice(5), // TODO(kevinb): don't prefix with 'm' - body: At(r), - isCharacterBox: ze.isCharacterBox(r) + body: At(i), + isCharacterBox: ze.isCharacterBox(i) }; }, htmlBuilder: Fp, mathmlBuilder: Pp }); -var d0 = (i) => { - var e = i.type === "ordgroup" && i.body.length ? i.body[0] : i; +var d0 = (r) => { + var e = r.type === "ordgroup" && r.body.length ? r.body[0] : r; return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord"; }; le({ @@ -5715,10 +5715,10 @@ le({ props: { numArgs: 2 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "mclass", mode: t.mode, @@ -5734,21 +5734,21 @@ le({ props: { numArgs: 2 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i, r = e[1], s = e[0], a; - n !== "\\stackrel" ? a = d0(r) : a = "mrel"; + } = r, i = e[1], s = e[0], a; + n !== "\\stackrel" ? a = d0(i) : a = "mrel"; var o = { type: "op", - mode: r.mode, + mode: i.mode, limits: !0, alwaysHandleSupSub: !0, parentIsSupSub: !1, symbol: !1, suppressBaseShift: n !== "\\stackrel", - body: At(r) + body: At(i) }, l = { type: "supsub", mode: s.mode, @@ -5774,10 +5774,10 @@ le({ numArgs: 1, allowedInText: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "pmb", mode: t.mode, @@ -5785,12 +5785,12 @@ le({ body: At(e[0]) }; }, - htmlBuilder(i, e) { - var t = Wt(i.body, e, !0), n = z.makeSpan([i.mclass], t, e); + htmlBuilder(r, e) { + var t = Wt(r.body, e, !0), n = z.makeSpan([r.mclass], t, e); return n.style.textShadow = "0.02em 0.01em 0.04px", n; }, - mathmlBuilder(i, e) { - var t = $n(i.body, e), n = new ie.MathNode("mstyle", t); + mathmlBuilder(r, e) { + var t = $n(r.body, e), n = new re.MathNode("mstyle", t); return n.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), n; } }); @@ -5807,16 +5807,16 @@ var s3 = { body: [], mode: "math", style: "display" -}), jd = (i) => i.type === "textord" && i.text === "@", a3 = (i, e) => (i.type === "mathord" || i.type === "atom") && i.text === e; -function o3(i, e, t) { - var n = s3[i]; +}), jd = (r) => r.type === "textord" && r.text === "@", a3 = (r, e) => (r.type === "mathord" || r.type === "atom") && r.text === e; +function o3(r, e, t) { + var n = s3[r]; switch (n) { case "\\\\cdrightarrow": case "\\\\cdleftarrow": return t.callFunction(n, [e[0]], [e[1]]); case "\\uparrow": case "\\downarrow": { - var r = t.callFunction("\\\\cdleft", [e[0]], []), s = { + var i = t.callFunction("\\\\cdleft", [e[0]], []), s = { type: "atom", text: n, mode: "math", @@ -5824,7 +5824,7 @@ function o3(i, e, t) { }, a = t.callFunction("\\Big", [s], []), o = t.callFunction("\\\\cdright", [e[1]], []), l = { type: "ordgroup", mode: "math", - body: [r, a, o] + body: [i, a, o] }; return t.callFunction("\\\\cdparent", [l], []); } @@ -5846,20 +5846,20 @@ function o3(i, e, t) { }; } } -function l3(i) { +function l3(r) { var e = []; - for (i.gullet.beginGroup(), i.gullet.macros.set("\\cr", "\\\\\\relax"), i.gullet.beginGroup(); ; ) { - e.push(i.parseExpression(!1, "\\\\")), i.gullet.endGroup(), i.gullet.beginGroup(); - var t = i.fetch().text; + for (r.gullet.beginGroup(), r.gullet.macros.set("\\cr", "\\\\\\relax"), r.gullet.beginGroup(); ; ) { + e.push(r.parseExpression(!1, "\\\\")), r.gullet.endGroup(), r.gullet.beginGroup(); + var t = r.fetch().text; if (t === "&" || t === "\\\\") - i.consume(); + r.consume(); else if (t === "\\end") { e[e.length - 1].length === 0 && e.pop(); break; } else - throw new ve("Expected \\\\ or \\cr or \\end", i.nextToken); + throw new ve("Expected \\\\ or \\cr or \\end", r.nextToken); } - for (var n = [], r = [n], s = 0; s < e.length; s++) { + for (var n = [], i = [n], s = 0; s < e.length; s++) { for (var a = e[s], o = Kd(), l = 0; l < a.length; l++) if (!jd(a[l])) o.body.push(a[l]); @@ -5890,7 +5890,7 @@ function l3(i) { } else throw new ve('Expected one of "<>AV=|." after @', a[l]); - var m = o3(u, c, i), g = { + var m = o3(u, c, r), g = { type: "styling", body: [m], mode: "math", @@ -5899,10 +5899,10 @@ function l3(i) { }; n.push(g), o = Kd(); } - s % 2 === 0 ? n.push(o) : n.shift(), n = [], r.push(n); + s % 2 === 0 ? n.push(o) : n.shift(), n = [], i.push(n); } - i.gullet.endGroup(), i.gullet.endGroup(); - var p = new Array(r[0].length).fill({ + r.gullet.endGroup(), r.gullet.endGroup(); + var p = new Array(i[0].length).fill({ type: "align", align: "c", pregap: 0.25, @@ -5913,13 +5913,13 @@ function l3(i) { return { type: "array", mode: "math", - body: r, + body: i, arraystretch: 1, addJot: !0, rowGaps: [null], cols: p, colSeparationType: "CD", - hLinesBeforeRow: new Array(r.length + 1).fill([]) + hLinesBeforeRow: new Array(i.length + 1).fill([]) }; } le({ @@ -5928,11 +5928,11 @@ le({ props: { numArgs: 1 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i; + } = r; return { type: "cdlabel", mode: t.mode, @@ -5940,13 +5940,13 @@ le({ label: e[0] }; }, - htmlBuilder(i, e) { - var t = e.havingStyle(e.style.sup()), n = z.wrapFragment(Ge(i.label, t, e), e); - return n.classes.push("cd-label-" + i.side), n.style.bottom = ae(0.8 - n.depth), n.height = 0, n.depth = 0, n; + htmlBuilder(r, e) { + var t = e.havingStyle(e.style.sup()), n = z.wrapFragment(Ge(r.label, t, e), e); + return n.classes.push("cd-label-" + r.side), n.style.bottom = ae(0.8 - n.depth), n.height = 0, n.depth = 0, n; }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mrow", [tt(i.label, e)]); - return t = new ie.MathNode("mpadded", [t]), t.setAttribute("width", "0"), i.side === "left" && t.setAttribute("lspace", "-1width"), t.setAttribute("voffset", "0.7em"), t = new ie.MathNode("mstyle", [t]), t.setAttribute("displaystyle", "false"), t.setAttribute("scriptlevel", "1"), t; + mathmlBuilder(r, e) { + var t = new re.MathNode("mrow", [tt(r.label, e)]); + return t = new re.MathNode("mpadded", [t]), t.setAttribute("width", "0"), r.side === "left" && t.setAttribute("lspace", "-1width"), t.setAttribute("voffset", "0.7em"), t = new re.MathNode("mstyle", [t]), t.setAttribute("displaystyle", "false"), t.setAttribute("scriptlevel", "1"), t; } }); le({ @@ -5955,22 +5955,22 @@ le({ props: { numArgs: 1 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "cdlabelparent", mode: t.mode, fragment: e[0] }; }, - htmlBuilder(i, e) { - var t = z.wrapFragment(Ge(i.fragment, e), e); + htmlBuilder(r, e) { + var t = z.wrapFragment(Ge(r.fragment, e), e); return t.classes.push("cd-vert-arrow"), t; }, - mathmlBuilder(i, e) { - return new ie.MathNode("mrow", [tt(i.fragment, e)]); + mathmlBuilder(r, e) { + return new re.MathNode("mrow", [tt(r.fragment, e)]); } }); le({ @@ -5980,11 +5980,11 @@ le({ numArgs: 1, allowedInText: !0 }, - handler(i, e) { + handler(r, e) { for (var { parser: t - } = i, n = Ce(e[0], "ordgroup"), r = n.body, s = "", a = 0; a < r.length; a++) { - var o = Ce(r[a], "textord"); + } = r, n = Ce(e[0], "ordgroup"), i = n.body, s = "", a = 0; a < i.length; a++) { + var o = Ce(i[a], "textord"); s += o.text; } var l = parseInt(s), u; @@ -5999,12 +5999,12 @@ le({ }; } }); -var Mp = (i, e) => { - var t = Wt(i.body, e.withColor(i.color), !1); +var Mp = (r, e) => { + var t = Wt(r.body, e.withColor(r.color), !1); return z.makeFragment(t); -}, Op = (i, e) => { - var t = $n(i.body, e.withColor(i.color)), n = new ie.MathNode("mstyle", t); - return n.setAttribute("mathcolor", i.color), n; +}, Op = (r, e) => { + var t = $n(r.body, e.withColor(r.color)), n = new re.MathNode("mstyle", t); + return n.setAttribute("mathcolor", r.color), n; }; le({ type: "color", @@ -6014,15 +6014,15 @@ le({ allowedInText: !0, argTypes: ["color", "original"] }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i, n = Ce(e[0], "color-token").color, r = e[1]; + } = r, n = Ce(e[0], "color-token").color, i = e[1]; return { type: "color", mode: t.mode, color: n, - body: At(r) + body: At(i) }; }, htmlBuilder: Mp, @@ -6036,17 +6036,17 @@ le({ allowedInText: !0, argTypes: ["color"] }, - handler(i, e) { + handler(r, e) { var { parser: t, breakOnTokenText: n - } = i, r = Ce(e[0], "color-token").color; - t.gullet.macros.set("\\current@color", r); + } = r, i = Ce(e[0], "color-token").color; + t.gullet.macros.set("\\current@color", i); var s = t.parseExpression(!0, n); return { type: "color", mode: t.mode, - color: r, + color: i, body: s }; }, @@ -6061,26 +6061,26 @@ le({ numOptionalArgs: 0, allowedInText: !0 }, - handler(i, e, t) { + handler(r, e, t) { var { parser: n - } = i, r = n.gullet.future().text === "[" ? n.parseSizeGroup(!0) : null, s = !n.settings.displayMode || !n.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode"); + } = r, i = n.gullet.future().text === "[" ? n.parseSizeGroup(!0) : null, s = !n.settings.displayMode || !n.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode"); return { type: "cr", mode: n.mode, newLine: s, - size: r && Ce(r, "size").value + size: i && Ce(i, "size").value }; }, // The following builders are called only at the top level, // not within tabular/array environments. - htmlBuilder(i, e) { + htmlBuilder(r, e) { var t = z.makeSpan(["mspace"], [], e); - return i.newLine && (t.classes.push("newline"), i.size && (t.style.marginTop = ae(ht(i.size, e)))), t; + return r.newLine && (t.classes.push("newline"), r.size && (t.style.marginTop = ae(ht(r.size, e)))), t; }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mspace"); - return i.newLine && (t.setAttribute("linebreak", "newline"), i.size && t.setAttribute("height", ae(ht(i.size, e)))), t; + mathmlBuilder(r, e) { + var t = new re.MathNode("mspace"); + return r.newLine && (t.setAttribute("linebreak", "newline"), r.size && t.setAttribute("height", ae(ht(r.size, e)))), t; } }); var fc = { @@ -6093,22 +6093,22 @@ var fc = { "\\xdef": "\\xdef", "\\let": "\\\\globallet", "\\futurelet": "\\\\globalfuture" -}, Bp = (i) => { - var e = i.text; +}, Bp = (r) => { + var e = r.text; if (/^(?:[\\{}$&#^_]|EOF)$/.test(e)) - throw new ve("Expected a control sequence", i); + throw new ve("Expected a control sequence", r); return e; -}, u3 = (i) => { - var e = i.gullet.popToken(); - return e.text === "=" && (e = i.gullet.popToken(), e.text === " " && (e = i.gullet.popToken())), e; -}, Np = (i, e, t, n) => { - var r = i.gullet.macros.get(t.text); - r == null && (t.noexpand = !0, r = { +}, u3 = (r) => { + var e = r.gullet.popToken(); + return e.text === "=" && (e = r.gullet.popToken(), e.text === " " && (e = r.gullet.popToken())), e; +}, Np = (r, e, t, n) => { + var i = r.gullet.macros.get(t.text); + i == null && (t.noexpand = !0, i = { tokens: [t], numArgs: 0, // reproduce the same behavior in expansion - unexpandable: !i.gullet.isExpandable(t.text) - }), i.gullet.macros.set(e, r, n); + unexpandable: !r.gullet.isExpandable(t.text) + }), r.gullet.macros.set(e, i, n); }; le({ type: "internal", @@ -6122,11 +6122,11 @@ le({ numArgs: 0, allowedInText: !0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i; + } = r; e.consumeSpaces(); var n = e.fetch(); if (fc[n.text]) @@ -6142,12 +6142,12 @@ le({ allowedInText: !0, primitive: !0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i, n = e.gullet.popToken(), r = n.text; - if (/^(?:[\\{}$&#^_]|EOF)$/.test(r)) + } = r, n = e.gullet.popToken(), i = n.text; + if (/^(?:[\\{}$&#^_]|EOF)$/.test(i)) throw new ve("Expected a control sequence", n); for (var s = 0, a, o = [[]]; e.gullet.future().text !== "{"; ) if (n = e.gullet.popToken(), n.text === "#") { @@ -6168,7 +6168,7 @@ le({ var { tokens: l } = e.gullet.consumeArg(); - return a && l.unshift(a), (t === "\\edef" || t === "\\xdef") && (l = e.gullet.expandTokens(l), l.reverse()), e.gullet.macros.set(r, { + return a && l.unshift(a), (t === "\\edef" || t === "\\xdef") && (l = e.gullet.expandTokens(l), l.reverse()), e.gullet.macros.set(i, { tokens: l, numArgs: s, delimiters: o @@ -6190,14 +6190,14 @@ le({ allowedInText: !0, primitive: !0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i, n = Bp(e.gullet.popToken()); + } = r, n = Bp(e.gullet.popToken()); e.gullet.consumeSpaces(); - var r = u3(e); - return Np(e, n, r, t === "\\\\globallet"), { + var i = u3(e); + return Np(e, n, i, t === "\\\\globallet"), { type: "internal", mode: e.mode }; @@ -6215,61 +6215,61 @@ le({ allowedInText: !0, primitive: !0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i, n = Bp(e.gullet.popToken()), r = e.gullet.popToken(), s = e.gullet.popToken(); - return Np(e, n, s, t === "\\\\globalfuture"), e.gullet.pushToken(s), e.gullet.pushToken(r), { + } = r, n = Bp(e.gullet.popToken()), i = e.gullet.popToken(), s = e.gullet.popToken(); + return Np(e, n, s, t === "\\\\globalfuture"), e.gullet.pushToken(s), e.gullet.pushToken(i), { type: "internal", mode: e.mode }; } }); var Sa = function(e, t, n) { - var r = xt.math[e] && xt.math[e].replace, s = dh(r || e, t, n); + var i = xt.math[e] && xt.math[e].replace, s = dh(i || e, t, n); if (!s) throw new Error("Unsupported symbol " + e + " and font size " + t + "."); return s; -}, vh = function(e, t, n, r) { - var s = n.havingBaseStyle(t), a = z.makeSpan(r.concat(s.sizingClasses(n)), [e], n), o = s.sizeMultiplier / n.sizeMultiplier; +}, vh = function(e, t, n, i) { + var s = n.havingBaseStyle(t), a = z.makeSpan(i.concat(s.sizingClasses(n)), [e], n), o = s.sizeMultiplier / n.sizeMultiplier; return a.height *= o, a.depth *= o, a.maxFontSize = s.sizeMultiplier, a; }, $p = function(e, t, n) { - var r = t.havingBaseStyle(n), s = (1 - t.sizeMultiplier / r.sizeMultiplier) * t.fontMetrics().axisHeight; + var i = t.havingBaseStyle(n), s = (1 - t.sizeMultiplier / i.sizeMultiplier) * t.fontMetrics().axisHeight; e.classes.push("delimcenter"), e.style.top = ae(s), e.height -= s, e.depth += s; -}, c3 = function(e, t, n, r, s, a) { - var o = z.makeSymbol(e, "Main-Regular", s, r), l = vh(o, t, r, a); - return n && $p(l, r, t), l; -}, h3 = function(e, t, n, r) { - return z.makeSymbol(e, "Size" + t + "-Regular", n, r); -}, Up = function(e, t, n, r, s, a) { - var o = h3(e, t, s, r), l = vh(z.makeSpan(["delimsizing", "size" + t], [o], r), Te.TEXT, r, a); - return n && $p(l, r, Te.TEXT), l; +}, c3 = function(e, t, n, i, s, a) { + var o = z.makeSymbol(e, "Main-Regular", s, i), l = vh(o, t, i, a); + return n && $p(l, i, t), l; +}, h3 = function(e, t, n, i) { + return z.makeSymbol(e, "Size" + t + "-Regular", n, i); +}, Up = function(e, t, n, i, s, a) { + var o = h3(e, t, s, i), l = vh(z.makeSpan(["delimsizing", "size" + t], [o], i), Te.TEXT, i, a); + return n && $p(l, i, Te.TEXT), l; }, $0 = function(e, t, n) { - var r; - t === "Size1-Regular" ? r = "delim-size1" : r = "delim-size4"; - var s = z.makeSpan(["delimsizinginner", r], [z.makeSpan([], [z.makeSymbol(e, t, n)])]); + var i; + t === "Size1-Regular" ? i = "delim-size1" : i = "delim-size4"; + var s = z.makeSpan(["delimsizinginner", i], [z.makeSpan([], [z.makeSymbol(e, t, n)])]); return { type: "elem", elem: s }; }, U0 = function(e, t, n) { - var r = rr["Size4-Regular"][e.charCodeAt(0)] ? rr["Size4-Regular"][e.charCodeAt(0)][4] : rr["Size1-Regular"][e.charCodeAt(0)][4], s = new ns("inner", Ey(e, Math.round(1e3 * t))), a = new wr([s], { - width: ae(r), + var i = ii["Size4-Regular"][e.charCodeAt(0)] ? ii["Size4-Regular"][e.charCodeAt(0)][4] : ii["Size1-Regular"][e.charCodeAt(0)][4], s = new ns("inner", Ey(e, Math.round(1e3 * t))), a = new wi([s], { + width: ae(i), height: ae(t), // Override CSS rule `.katex svg { width: 100% }` - style: "width:" + ae(r), - viewBox: "0 0 " + 1e3 * r + " " + Math.round(1e3 * t), + style: "width:" + ae(i), + viewBox: "0 0 " + 1e3 * i + " " + Math.round(1e3 * t), preserveAspectRatio: "xMinYMin" }), o = z.makeSvgSpan([], [a], n); - return o.height = t, o.style.height = ae(t), o.style.width = ae(r), { + return o.height = t, o.style.height = ae(t), o.style.width = ae(i), { type: "elem", elem: o }; }, mc = 8e-3, bo = { type: "kern", size: -1 * mc -}, d3 = ["|", "\\lvert", "\\rvert", "\\vert"], f3 = ["\\|", "\\lVert", "\\rVert", "\\Vert"], Hp = function(e, t, n, r, s, a) { +}, d3 = ["|", "\\lvert", "\\rvert", "\\vert"], f3 = ["\\|", "\\lVert", "\\rVert", "\\Vert"], Hp = function(e, t, n, i, s, a) { var o, l, u, c, h = "", d = 0; o = u = c = e, l = null; var f = "Size1-Regular"; @@ -6279,15 +6279,15 @@ var Sa = function(e, t, n) { var w = Sa(l, f, s); T = w.height + w.depth, A = 2; } - var D = g + v + T, L = Math.max(0, Math.ceil((t - D) / (A * b))), I = D + L * A * b, R = r.fontMetrics().axisHeight; - n && (R *= r.sizeMultiplier); + var D = g + v + T, L = Math.max(0, Math.ceil((t - D) / (A * b))), I = D + L * A * b, R = i.fontMetrics().axisHeight; + n && (R *= i.sizeMultiplier); var M = I / 2 - R, P = []; if (h.length > 0) { - var V = I - g - v, U = Math.round(I * 1e3), J = Sy(h, Math.round(V * 1e3)), Y = new ns(h, J), X = (d / 1e3).toFixed(3) + "em", $ = (U / 1e3).toFixed(3) + "em", Z = new wr([Y], { + var V = I - g - v, U = Math.round(I * 1e3), J = Sy(h, Math.round(V * 1e3)), Y = new ns(h, J), X = (d / 1e3).toFixed(3) + "em", $ = (U / 1e3).toFixed(3) + "em", Z = new wi([Y], { width: X, height: $, viewBox: "0 0 " + d + " " + U - }), ne = z.makeSvgSpan([], [Z], r); + }), ne = z.makeSvgSpan([], [Z], i); ne.height = U / 1e3, ne.style.width = X, ne.style.height = $, P.push({ type: "elem", elem: ne @@ -6295,21 +6295,21 @@ var Sa = function(e, t, n) { } else { if (P.push($0(c, f, s)), P.push(bo), l === null) { var B = I - g - v + 2 * mc; - P.push(U0(u, B, r)); + P.push(U0(u, B, i)); } else { var q = (I - g - v - T) / 2 + 2 * mc; - P.push(U0(u, q, r)), P.push(bo), P.push($0(l, f, s)), P.push(bo), P.push(U0(u, q, r)); + P.push(U0(u, q, i)), P.push(bo), P.push($0(l, f, s)), P.push(bo), P.push(U0(u, q, i)); } P.push(bo), P.push($0(o, f, s)); } - var se = r.havingBaseStyle(Te.TEXT), he = z.makeVList({ + var se = i.havingBaseStyle(Te.TEXT), he = z.makeVList({ positionType: "bottom", positionData: M, children: P }, se); - return vh(z.makeSpan(["delimsizing", "mult"], [he], se), Te.TEXT, r, a); -}, H0 = 80, G0 = 0.08, z0 = function(e, t, n, r, s) { - var a = by(e, r, n), o = new ns(e, a), l = new wr([o], { + return vh(z.makeSpan(["delimsizing", "mult"], [he], se), Te.TEXT, i, a); +}, H0 = 80, G0 = 0.08, z0 = function(e, t, n, i, s) { + var a = by(e, i, n), o = new ns(e, a), l = new wi([o], { // Note: 1000:1 ratio of viewBox to document em width. width: "400em", height: ae(t), @@ -6318,8 +6318,8 @@ var Sa = function(e, t, n) { }); return z.makeSvgSpan(["hide-tail"], [l], s); }, m3 = function(e, t) { - var n = t.havingBaseSizing(), r = Vp("\\surd", e * n.sizeMultiplier, qp, n), s = n.sizeMultiplier, a = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), o, l = 0, u = 0, c = 0, h; - return r.type === "small" ? (c = 1e3 + 1e3 * a + H0, e < 1 ? s = 1 : e < 1.4 && (s = 0.7), l = (1 + a + G0) / s, u = (1 + a) / s, o = z0("sqrtMain", l, c, a, t), o.style.minWidth = "0.853em", h = 0.833 / s) : r.type === "large" ? (c = (1e3 + H0) * wa[r.size], u = (wa[r.size] + a) / s, l = (wa[r.size] + a + G0) / s, o = z0("sqrtSize" + r.size, l, c, a, t), o.style.minWidth = "1.02em", h = 1 / s) : (l = e + a + G0, u = e + a, c = Math.floor(1e3 * e + a) + H0, o = z0("sqrtTall", l, c, a, t), o.style.minWidth = "0.742em", h = 1.056), o.height = u, o.style.height = ae(l), { + var n = t.havingBaseSizing(), i = Vp("\\surd", e * n.sizeMultiplier, qp, n), s = n.sizeMultiplier, a = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), o, l = 0, u = 0, c = 0, h; + return i.type === "small" ? (c = 1e3 + 1e3 * a + H0, e < 1 ? s = 1 : e < 1.4 && (s = 0.7), l = (1 + a + G0) / s, u = (1 + a) / s, o = z0("sqrtMain", l, c, a, t), o.style.minWidth = "0.853em", h = 0.833 / s) : i.type === "large" ? (c = (1e3 + H0) * wa[i.size], u = (wa[i.size] + a) / s, l = (wa[i.size] + a + G0) / s, o = z0("sqrtSize" + i.size, l, c, a, t), o.style.minWidth = "1.02em", h = 1 / s) : (l = e + a + G0, u = e + a, c = Math.floor(1e3 * e + a) + H0, o = z0("sqrtTall", l, c, a, t), o.style.minWidth = "0.742em", h = 1.056), o.height = u, o.style.height = ae(l), { span: o, advanceWidth: h, // Calculate the actual line width. @@ -6328,11 +6328,11 @@ var Sa = function(e, t, n) { // have thicker rules. ruleWidth: (t.fontMetrics().sqrtRuleThickness + a) * s }; -}, Gp = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], g3 = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], zp = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], wa = [0, 1.2, 1.8, 2.4, 3], p3 = function(e, t, n, r, s) { +}, Gp = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], g3 = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], zp = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], wa = [0, 1.2, 1.8, 2.4, 3], p3 = function(e, t, n, i, s) { if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), Gp.includes(e) || zp.includes(e)) - return Up(e, t, !1, n, r, s); + return Up(e, t, !1, n, i, s); if (g3.includes(e)) - return Hp(e, wa[t], !1, n, r, s); + return Hp(e, wa[t], !1, n, i, s); throw new ve("Illegal delimiter: '" + e + "'"); }, _3 = [{ type: "small", @@ -6397,25 +6397,25 @@ var Sa = function(e, t, n) { if (e.type === "stack") return "Size4-Regular"; throw new Error("Add support for delim type '" + e.type + "' here."); -}, Vp = function(e, t, n, r) { - for (var s = Math.min(2, 3 - r.style.size), a = s; a < n.length && n[a].type !== "stack"; a++) { +}, Vp = function(e, t, n, i) { + for (var s = Math.min(2, 3 - i.style.size), a = s; a < n.length && n[a].type !== "stack"; a++) { var o = Sa(e, y3(n[a]), "math"), l = o.height + o.depth; if (n[a].type === "small") { - var u = r.havingBaseStyle(n[a].style); + var u = i.havingBaseStyle(n[a].style); l *= u.sizeMultiplier; } if (l > t) return n[a]; } return n[n.length - 1]; -}, Kp = function(e, t, n, r, s, a) { +}, Kp = function(e, t, n, i, s, a) { e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"); var o; zp.includes(e) ? o = _3 : Gp.includes(e) ? o = qp : o = v3; - var l = Vp(e, t, o, r); - return l.type === "small" ? c3(e, l.style, n, r, s, a) : l.type === "large" ? Up(e, l.size, n, r, s, a) : Hp(e, t, n, r, s, a); -}, b3 = function(e, t, n, r, s, a) { - var o = r.fontMetrics().axisHeight * r.sizeMultiplier, l = 901, u = 5 / r.fontMetrics().ptPerEm, c = Math.max(t - o, n + o), h = Math.max( + var l = Vp(e, t, o, i); + return l.type === "small" ? c3(e, l.style, n, i, s, a) : l.type === "large" ? Up(e, l.size, n, i, s, a) : Hp(e, t, n, i, s, a); +}, b3 = function(e, t, n, i, s, a) { + var o = i.fontMetrics().axisHeight * i.sizeMultiplier, l = 901, u = 5 / i.fontMetrics().ptPerEm, c = Math.max(t - o, n + o), h = Math.max( // In real TeX, calculations are done using integral values which are // 65536 per pt, or 655360 per em. So, the division here truncates in // TeX but doesn't here, producing different results. If we wanted to @@ -6428,8 +6428,8 @@ var Sa = function(e, t, n) { c / 500 * l, 2 * c - u ); - return Kp(e, h, !0, r, s, a); -}, ar = { + return Kp(e, h, !0, i, s, a); +}, ai = { sqrtImage: m3, sizedDelim: p3, sizeToMaxHeight: wa, @@ -6501,11 +6501,11 @@ var Sa = function(e, t, n) { size: 4 } }, E3 = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."]; -function f0(i, e) { - var t = h0(i); +function f0(r, e) { + var t = h0(r); if (t && E3.includes(t.text)) return t; - throw t ? new ve("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", i) : new ve("Invalid delimiter type '" + i.type + "'", i); + throw t ? new ve("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", r) : new ve("Invalid delimiter type '" + r.type + "'", r); } le({ type: "delimsizing", @@ -6514,28 +6514,28 @@ le({ numArgs: 1, argTypes: ["primitive"] }, - handler: (i, e) => { - var t = f0(e[0], i); + handler: (r, e) => { + var t = f0(e[0], r); return { type: "delimsizing", - mode: i.parser.mode, - size: Wd[i.funcName].size, - mclass: Wd[i.funcName].mclass, + mode: r.parser.mode, + size: Wd[r.funcName].size, + mclass: Wd[r.funcName].mclass, delim: t.text }; }, - htmlBuilder: (i, e) => i.delim === "." ? z.makeSpan([i.mclass]) : ar.sizedDelim(i.delim, i.size, e, i.mode, [i.mclass]), - mathmlBuilder: (i) => { + htmlBuilder: (r, e) => r.delim === "." ? z.makeSpan([r.mclass]) : ai.sizedDelim(r.delim, r.size, e, r.mode, [r.mclass]), + mathmlBuilder: (r) => { var e = []; - i.delim !== "." && e.push(Qn(i.delim, i.mode)); - var t = new ie.MathNode("mo", e); - i.mclass === "mopen" || i.mclass === "mclose" ? t.setAttribute("fence", "true") : t.setAttribute("fence", "false"), t.setAttribute("stretchy", "true"); - var n = ae(ar.sizeToMaxHeight[i.size]); + r.delim !== "." && e.push(Qn(r.delim, r.mode)); + var t = new re.MathNode("mo", e); + r.mclass === "mopen" || r.mclass === "mclose" ? t.setAttribute("fence", "true") : t.setAttribute("fence", "false"), t.setAttribute("stretchy", "true"); + var n = ae(ai.sizeToMaxHeight[r.size]); return t.setAttribute("minsize", n), t.setAttribute("maxsize", n), t; } }); -function Yd(i) { - if (!i.body) +function Yd(r) { + if (!r.body) throw new Error("Bug: The leftright ParseNode wasn't fully parsed."); } le({ @@ -6545,14 +6545,14 @@ le({ numArgs: 1, primitive: !0 }, - handler: (i, e) => { - var t = i.parser.gullet.macros.get("\\current@color"); + handler: (r, e) => { + var t = r.parser.gullet.macros.get("\\current@color"); if (t && typeof t != "string") throw new ve("\\current@color set to non-string in \\right"); return { type: "leftright-right", - mode: i.parser.mode, - delim: f0(e[0], i).text, + mode: r.parser.mode, + delim: f0(e[0], r).text, color: t // undefined if not set via \color }; @@ -6565,51 +6565,51 @@ le({ numArgs: 1, primitive: !0 }, - handler: (i, e) => { - var t = f0(e[0], i), n = i.parser; + handler: (r, e) => { + var t = f0(e[0], r), n = r.parser; ++n.leftrightDepth; - var r = n.parseExpression(!1); + var i = n.parseExpression(!1); --n.leftrightDepth, n.expect("\\right", !1); var s = Ce(n.parseFunction(), "leftright-right"); return { type: "leftright", mode: n.mode, - body: r, + body: i, left: t.text, right: s.delim, rightColor: s.color }; }, - htmlBuilder: (i, e) => { - Yd(i); - for (var t = Wt(i.body, e, !0, ["mopen", "mclose"]), n = 0, r = 0, s = !1, a = 0; a < t.length; a++) - t[a].isMiddle ? s = !0 : (n = Math.max(t[a].height, n), r = Math.max(t[a].depth, r)); - n *= e.sizeMultiplier, r *= e.sizeMultiplier; + htmlBuilder: (r, e) => { + Yd(r); + for (var t = Wt(r.body, e, !0, ["mopen", "mclose"]), n = 0, i = 0, s = !1, a = 0; a < t.length; a++) + t[a].isMiddle ? s = !0 : (n = Math.max(t[a].height, n), i = Math.max(t[a].depth, i)); + n *= e.sizeMultiplier, i *= e.sizeMultiplier; var o; - if (i.left === "." ? o = Oa(e, ["mopen"]) : o = ar.leftRightDelim(i.left, n, r, e, i.mode, ["mopen"]), t.unshift(o), s) + if (r.left === "." ? o = Oa(e, ["mopen"]) : o = ai.leftRightDelim(r.left, n, i, e, r.mode, ["mopen"]), t.unshift(o), s) for (var l = 1; l < t.length; l++) { var u = t[l], c = u.isMiddle; - c && (t[l] = ar.leftRightDelim(c.delim, n, r, c.options, i.mode, [])); + c && (t[l] = ai.leftRightDelim(c.delim, n, i, c.options, r.mode, [])); } var h; - if (i.right === ".") + if (r.right === ".") h = Oa(e, ["mclose"]); else { - var d = i.rightColor ? e.withColor(i.rightColor) : e; - h = ar.leftRightDelim(i.right, n, r, d, i.mode, ["mclose"]); + var d = r.rightColor ? e.withColor(r.rightColor) : e; + h = ai.leftRightDelim(r.right, n, i, d, r.mode, ["mclose"]); } return t.push(h), z.makeSpan(["minner"], t, e); }, - mathmlBuilder: (i, e) => { - Yd(i); - var t = $n(i.body, e); - if (i.left !== ".") { - var n = new ie.MathNode("mo", [Qn(i.left, i.mode)]); + mathmlBuilder: (r, e) => { + Yd(r); + var t = $n(r.body, e); + if (r.left !== ".") { + var n = new re.MathNode("mo", [Qn(r.left, r.mode)]); n.setAttribute("fence", "true"), t.unshift(n); } - if (i.right !== ".") { - var r = new ie.MathNode("mo", [Qn(i.right, i.mode)]); - r.setAttribute("fence", "true"), i.rightColor && r.setAttribute("mathcolor", i.rightColor), t.push(r); + if (r.right !== ".") { + var i = new re.MathNode("mo", [Qn(r.right, r.mode)]); + i.setAttribute("fence", "true"), r.rightColor && i.setAttribute("mathcolor", r.rightColor), t.push(i); } return mh(t); } @@ -6621,39 +6621,39 @@ le({ numArgs: 1, primitive: !0 }, - handler: (i, e) => { - var t = f0(e[0], i); - if (!i.parser.leftrightDepth) + handler: (r, e) => { + var t = f0(e[0], r); + if (!r.parser.leftrightDepth) throw new ve("\\middle without preceding \\left", t); return { type: "middle", - mode: i.parser.mode, + mode: r.parser.mode, delim: t.text }; }, - htmlBuilder: (i, e) => { + htmlBuilder: (r, e) => { var t; - if (i.delim === ".") + if (r.delim === ".") t = Oa(e, []); else { - t = ar.sizedDelim(i.delim, 1, e, i.mode, []); + t = ai.sizedDelim(r.delim, 1, e, r.mode, []); var n = { - delim: i.delim, + delim: r.delim, options: e }; t.isMiddle = n; } return t; }, - mathmlBuilder: (i, e) => { - var t = i.delim === "\\vert" || i.delim === "|" ? Qn("|", "text") : Qn(i.delim, i.mode), n = new ie.MathNode("mo", [t]); + mathmlBuilder: (r, e) => { + var t = r.delim === "\\vert" || r.delim === "|" ? Qn("|", "text") : Qn(r.delim, r.mode), n = new re.MathNode("mo", [t]); return n.setAttribute("fence", "true"), n.setAttribute("lspace", "0.05em"), n.setAttribute("rspace", "0.05em"), n; } }); -var yh = (i, e) => { - var t = z.wrapFragment(Ge(i.body, e), e), n = i.label.slice(1), r = e.sizeMultiplier, s, a = 0, o = ze.isCharacterBox(i.body); +var yh = (r, e) => { + var t = z.wrapFragment(Ge(r.body, e), e), n = r.label.slice(1), i = e.sizeMultiplier, s, a = 0, o = ze.isCharacterBox(r.body); if (n === "sout") - s = z.makeSpan(["stretchy", "sout"]), s.height = e.fontMetrics().defaultRuleThickness / r, a = -0.5 * e.fontMetrics().xHeight; + s = z.makeSpan(["stretchy", "sout"]), s.height = e.fontMetrics().defaultRuleThickness / i, a = -0.5 * e.fontMetrics().xHeight; else if (n === "phase") { var l = ht({ number: 0.6, @@ -6662,10 +6662,10 @@ var yh = (i, e) => { number: 0.35, unit: "ex" }, e), c = e.havingBaseSizing(); - r = r / c.sizeMultiplier; + i = i / c.sizeMultiplier; var h = t.height + t.depth + l + u; t.style.paddingLeft = ae(h / 2 + l); - var d = Math.floor(1e3 * h * r), f = vy(d), m = new wr([new ns("phase", f)], { + var d = Math.floor(1e3 * h * i), f = vy(d), m = new wi([new ns("phase", f)], { width: "400em", height: ae(d / 1e3), viewBox: "0 0 400000 " + d, @@ -6680,10 +6680,10 @@ var yh = (i, e) => { // default e.minRuleThickness // User override. - ), g = e.fontMetrics().fboxsep + (n === "colorbox" ? 0 : b), p = g) : n === "angl" ? (b = Math.max(e.fontMetrics().defaultRuleThickness, e.minRuleThickness), g = 4 * b, p = Math.max(0, 0.25 - t.depth)) : (g = o ? 0.2 : 0, p = g), s = or.encloseSpan(t, n, g, p, e), /fbox|boxed|fcolorbox/.test(n) ? (s.style.borderStyle = "solid", s.style.borderWidth = ae(b)) : n === "angl" && b !== 0.049 && (s.style.borderTopWidth = ae(b), s.style.borderRightWidth = ae(b)), a = t.depth + p, i.backgroundColor && (s.style.backgroundColor = i.backgroundColor, i.borderColor && (s.style.borderColor = i.borderColor)); + ), g = e.fontMetrics().fboxsep + (n === "colorbox" ? 0 : b), p = g) : n === "angl" ? (b = Math.max(e.fontMetrics().defaultRuleThickness, e.minRuleThickness), g = 4 * b, p = Math.max(0, 0.25 - t.depth)) : (g = o ? 0.2 : 0, p = g), s = oi.encloseSpan(t, n, g, p, e), /fbox|boxed|fcolorbox/.test(n) ? (s.style.borderStyle = "solid", s.style.borderWidth = ae(b)) : n === "angl" && b !== 0.049 && (s.style.borderTopWidth = ae(b), s.style.borderRightWidth = ae(b)), a = t.depth + p, r.backgroundColor && (s.style.backgroundColor = r.backgroundColor, r.borderColor && (s.style.borderColor = r.borderColor)); } var y; - if (i.backgroundColor) + if (r.backgroundColor) y = z.makeVList({ positionType: "individualShift", children: [ @@ -6721,9 +6721,9 @@ var yh = (i, e) => { }, e); } return /cancel/.test(n) && (y.height = t.height, y.depth = t.depth), /cancel/.test(n) && !o ? z.makeSpan(["mord", "cancel-lap"], [y], e) : z.makeSpan(["mord"], [y], e); -}, bh = (i, e) => { - var t = 0, n = new ie.MathNode(i.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [tt(i.body, e)]); - switch (i.label) { +}, bh = (r, e) => { + var t = 0, n = new re.MathNode(r.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [tt(r.body, e)]); + switch (r.label) { case "\\cancel": n.setAttribute("notation", "updiagonalstrike"); break; @@ -6744,21 +6744,21 @@ var yh = (i, e) => { break; case "\\fcolorbox": case "\\colorbox": - if (t = e.fontMetrics().fboxsep * e.fontMetrics().ptPerEm, n.setAttribute("width", "+" + 2 * t + "pt"), n.setAttribute("height", "+" + 2 * t + "pt"), n.setAttribute("lspace", t + "pt"), n.setAttribute("voffset", t + "pt"), i.label === "\\fcolorbox") { - var r = Math.max( + if (t = e.fontMetrics().fboxsep * e.fontMetrics().ptPerEm, n.setAttribute("width", "+" + 2 * t + "pt"), n.setAttribute("height", "+" + 2 * t + "pt"), n.setAttribute("lspace", t + "pt"), n.setAttribute("voffset", t + "pt"), r.label === "\\fcolorbox") { + var i = Math.max( e.fontMetrics().fboxrule, // default e.minRuleThickness // user override ); - n.setAttribute("style", "border: " + r + "em solid " + String(i.borderColor)); + n.setAttribute("style", "border: " + i + "em solid " + String(r.borderColor)); } break; case "\\xcancel": n.setAttribute("notation", "updiagonalstrike downdiagonalstrike"); break; } - return i.backgroundColor && n.setAttribute("mathbackground", i.backgroundColor), n; + return r.backgroundColor && n.setAttribute("mathbackground", r.backgroundColor), n; }; le({ type: "enclose", @@ -6768,15 +6768,15 @@ le({ allowedInText: !0, argTypes: ["color", "text"] }, - handler(i, e, t) { + handler(r, e, t) { var { parser: n, - funcName: r - } = i, s = Ce(e[0], "color-token").color, a = e[1]; + funcName: i + } = r, s = Ce(e[0], "color-token").color, a = e[1]; return { type: "enclose", mode: n.mode, - label: r, + label: i, backgroundColor: s, body: a }; @@ -6792,15 +6792,15 @@ le({ allowedInText: !0, argTypes: ["color", "color", "text"] }, - handler(i, e, t) { + handler(r, e, t) { var { parser: n, - funcName: r - } = i, s = Ce(e[0], "color-token").color, a = Ce(e[1], "color-token").color, o = e[2]; + funcName: i + } = r, s = Ce(e[0], "color-token").color, a = Ce(e[1], "color-token").color, o = e[2]; return { type: "enclose", mode: n.mode, - label: r, + label: i, backgroundColor: a, borderColor: s, body: o @@ -6817,10 +6817,10 @@ le({ argTypes: ["hbox"], allowedInText: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "enclose", mode: t.mode, @@ -6835,16 +6835,16 @@ le({ props: { numArgs: 1 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i, r = e[0]; + } = r, i = e[0]; return { type: "enclose", mode: t.mode, label: n, - body: r + body: i }; }, htmlBuilder: yh, @@ -6858,10 +6858,10 @@ le({ argTypes: ["hbox"], allowedInText: !1 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "enclose", mode: t.mode, @@ -6871,49 +6871,49 @@ le({ } }); var jp = {}; -function zi(i) { +function zr(r) { for (var { type: e, names: t, props: n, - handler: r, + handler: i, htmlBuilder: s, mathmlBuilder: a - } = i, o = { + } = r, o = { type: e, numArgs: n.numArgs || 0, allowedInText: !1, numOptionalArgs: 0, - handler: r + handler: i }, l = 0; l < t.length; ++l) jp[t[l]] = o; s && (vl[e] = s), a && (yl[e] = a); } var S3 = {}; -function k(i, e) { - S3[i] = e; +function k(r, e) { + S3[r] = e; } -function Xd(i) { +function Xd(r) { var e = []; - i.consumeSpaces(); - var t = i.fetch().text; - for (t === "\\relax" && (i.consume(), i.consumeSpaces(), t = i.fetch().text); t === "\\hline" || t === "\\hdashline"; ) - i.consume(), e.push(t === "\\hdashline"), i.consumeSpaces(), t = i.fetch().text; + r.consumeSpaces(); + var t = r.fetch().text; + for (t === "\\relax" && (r.consume(), r.consumeSpaces(), t = r.fetch().text); t === "\\hline" || t === "\\hdashline"; ) + r.consume(), e.push(t === "\\hdashline"), r.consumeSpaces(), t = r.fetch().text; return e; } -var m0 = (i) => { - var e = i.parser.settings; +var m0 = (r) => { + var e = r.parser.settings; if (!e.displayMode) - throw new ve("{" + i.envName + "} can be used only in display mode."); + throw new ve("{" + r.envName + "} can be used only in display mode."); }; -function Eh(i) { - if (i.indexOf("ed") === -1) - return i.indexOf("*") === -1; +function Eh(r) { + if (r.indexOf("ed") === -1) + return r.indexOf("*") === -1; } -function Fr(i, e, t) { +function Fi(r, e, t) { var { hskipBeforeAndAfter: n, - addJot: r, + addJot: i, cols: s, arraystretch: a, colSeparationType: o, @@ -6923,55 +6923,55 @@ function Fr(i, e, t) { maxNumCols: h, leqno: d } = e; - if (i.gullet.beginGroup(), u || i.gullet.macros.set("\\cr", "\\\\\\relax"), !a) { - var f = i.gullet.expandMacroAsText("\\arraystretch"); + if (r.gullet.beginGroup(), u || r.gullet.macros.set("\\cr", "\\\\\\relax"), !a) { + var f = r.gullet.expandMacroAsText("\\arraystretch"); if (f == null) a = 1; else if (a = parseFloat(f), !a || a < 0) throw new ve("Invalid \\arraystretch: " + f); } - i.gullet.beginGroup(); + r.gullet.beginGroup(); var m = [], g = [m], p = [], b = [], y = l != null ? [] : void 0; function v() { - l && i.gullet.macros.set("\\@eqnsw", "1", !0); + l && r.gullet.macros.set("\\@eqnsw", "1", !0); } function T() { - y && (i.gullet.macros.get("\\df@tag") ? (y.push(i.subparse([new ch("\\df@tag")])), i.gullet.macros.set("\\df@tag", void 0, !0)) : y.push(!!l && i.gullet.macros.get("\\@eqnsw") === "1")); + y && (r.gullet.macros.get("\\df@tag") ? (y.push(r.subparse([new ch("\\df@tag")])), r.gullet.macros.set("\\df@tag", void 0, !0)) : y.push(!!l && r.gullet.macros.get("\\@eqnsw") === "1")); } - for (v(), b.push(Xd(i)); ; ) { - var A = i.parseExpression(!1, u ? "\\end" : "\\\\"); - i.gullet.endGroup(), i.gullet.beginGroup(), A = { + for (v(), b.push(Xd(r)); ; ) { + var A = r.parseExpression(!1, u ? "\\end" : "\\\\"); + r.gullet.endGroup(), r.gullet.beginGroup(), A = { type: "ordgroup", - mode: i.mode, + mode: r.mode, body: A }, t && (A = { type: "styling", - mode: i.mode, + mode: r.mode, style: t, body: [A] }), m.push(A); - var w = i.fetch().text; + var w = r.fetch().text; if (w === "&") { if (h && m.length === h) { if (u || o) - throw new ve("Too many tab characters: &", i.nextToken); - i.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument."); + throw new ve("Too many tab characters: &", r.nextToken); + r.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument."); } - i.consume(); + r.consume(); } else if (w === "\\end") { T(), m.length === 1 && A.type === "styling" && A.body[0].body.length === 0 && (g.length > 1 || !c) && g.pop(), b.length < g.length + 1 && b.push([]); break; } else if (w === "\\\\") { - i.consume(); + r.consume(); var D = void 0; - i.gullet.future().text !== " " && (D = i.parseSizeGroup(!0)), p.push(D ? D.value : null), T(), b.push(Xd(i)), m = [], g.push(m), v(); + r.gullet.future().text !== " " && (D = r.parseSizeGroup(!0)), p.push(D ? D.value : null), T(), b.push(Xd(r)), m = [], g.push(m), v(); } else - throw new ve("Expected & or \\\\ or \\cr or \\end", i.nextToken); + throw new ve("Expected & or \\\\ or \\cr or \\end", r.nextToken); } - return i.gullet.endGroup(), i.gullet.endGroup(), { + return r.gullet.endGroup(), r.gullet.endGroup(), { type: "array", - mode: i.mode, - addJot: r, + mode: r.mode, + addJot: i, arraystretch: a, body: g, cols: s, @@ -6983,11 +6983,11 @@ function Fr(i, e, t) { leqno: d }; } -function Sh(i) { - return i.slice(0, 1) === "d" ? "display" : "text"; +function Sh(r) { + return r.slice(0, 1) === "d" ? "display" : "text"; } -var qi = function(e, t) { - var n, r, s = e.body.length, a = e.hLinesBeforeRow, o = 0, l = new Array(s), u = [], c = Math.max( +var qr = function(e, t) { + var n, i, s = e.body.length, a = e.hLinesBeforeRow, o = 0, l = new Array(s), u = [], c = Math.max( // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em. t.fontMetrics().arrayRuleWidth, t.minRuleThickness @@ -7012,9 +7012,9 @@ var qi = function(e, t) { var A = e.body[n], w = b, D = y; o < A.length && (o = A.length); var L = new Array(A.length); - for (r = 0; r < A.length; ++r) { - var I = Ge(A[r], t); - D < I.depth && (D = I.depth), w < I.height && (w = I.height), L[r] = I; + for (i = 0; i < A.length; ++i) { + var I = Ge(A[i], t); + D < I.depth && (D = I.depth), w < I.height && (w = I.height), L[i] = I; } var R = e.rowGaps[n], M = 0; R && (M = ht(R, t), M > 0 && (M += y, D < M && (D = M), M = 0)), e.addJot && (D += g), L.height = w, L.depth = D, v += w, L.pos = v, v += D + M, l[n] = L, T(a[n + 1]); @@ -7030,11 +7030,11 @@ var qi = function(e, t) { }); } for ( - r = 0, Y = 0; + i = 0, Y = 0; // Continue while either there are more columns or more column // descriptions, so trailing separators don't get lost. - r < o || Y < V.length; - ++r, ++Y + i < o || Y < V.length; + ++i, ++Y ) { for (var q = V[Y] || {}, se = !0; q.type === "separator"; ) { if (se || (J = z.makeSpan(["arraycolsep"], []), J.style.width = ae(t.fontMetrics().doubleRuleSep), U.push(J)), q.separator === "|" || q.separator === ":") { @@ -7046,12 +7046,12 @@ var qi = function(e, t) { throw new ve("Invalid separator type: " + q.separator); Y++, q = V[Y] || {}, se = !1; } - if (!(r >= o)) { + if (!(i >= o)) { var xe = void 0; - (r > 0 || e.hskipBeforeAndAfter) && (xe = ze.deflt(q.pregap, d), xe !== 0 && (J = z.makeSpan(["arraycolsep"], []), J.style.width = ae(xe), U.push(J))); + (i > 0 || e.hskipBeforeAndAfter) && (xe = ze.deflt(q.pregap, d), xe !== 0 && (J = z.makeSpan(["arraycolsep"], []), J.style.width = ae(xe), U.push(J))); var j = []; for (n = 0; n < s; ++n) { - var me = l[n], ye = me[r]; + var me = l[n], ye = me[i]; if (ye) { var Ie = me.pos - P; ye.depth = me.depth, ye.height = me.height, j.push({ @@ -7064,7 +7064,7 @@ var qi = function(e, t) { j = z.makeVList({ positionType: "individualShift", children: j - }, t), j = z.makeSpan(["col-align-" + (q.align || "c")], [j]), U.push(j), (r < o - 1 || e.hskipBeforeAndAfter) && (xe = ze.deflt(q.postgap, d), xe !== 0 && (J = z.makeSpan(["arraycolsep"], []), J.style.width = ae(xe), U.push(J))); + }, t), j = z.makeSpan(["col-align-" + (q.align || "c")], [j]), U.push(j), (i < o - 1 || e.hskipBeforeAndAfter) && (xe = ze.deflt(q.postgap, d), xe !== 0 && (J = z.makeSpan(["arraycolsep"], []), J.style.width = ae(xe), U.push(J))); } } if (l = z.makeSpan(["mtable"], U), u.length > 0) { @@ -7100,13 +7100,13 @@ var qi = function(e, t) { c: "center ", l: "left ", r: "right " -}, Vi = function(e, t) { - for (var n = [], r = new ie.MathNode("mtd", [], ["mtr-glue"]), s = new ie.MathNode("mtd", [], ["mml-eqn-num"]), a = 0; a < e.body.length; a++) { +}, Vr = function(e, t) { + for (var n = [], i = new re.MathNode("mtd", [], ["mtr-glue"]), s = new re.MathNode("mtd", [], ["mml-eqn-num"]), a = 0; a < e.body.length; a++) { for (var o = e.body[a], l = [], u = 0; u < o.length; u++) - l.push(new ie.MathNode("mtd", [tt(o[u], t)])); - e.tags && e.tags[a] && (l.unshift(r), l.push(r), e.leqno ? l.unshift(s) : l.push(s)), n.push(new ie.MathNode("mtr", l)); + l.push(new re.MathNode("mtd", [tt(o[u], t)])); + e.tags && e.tags[a] && (l.unshift(i), l.push(i), e.leqno ? l.unshift(s) : l.push(s)), n.push(new re.MathNode("mtr", l)); } - var c = new ie.MathNode("mtable", n), h = e.arraystretch === 0.5 ? 0.1 : 0.16 + e.arraystretch - 1 + (e.addJot ? 0.09 : 0); + var c = new re.MathNode("mtable", n), h = e.arraystretch === 0.5 ? 0.1 : 0.16 + e.arraystretch - 1 + (e.addJot ? 0.09 : 0); c.setAttribute("rowspacing", ae(h)); var d = "", f = ""; if (e.cols && e.cols.length > 0) { @@ -7125,15 +7125,15 @@ var qi = function(e, t) { d += L[0].length > 0 ? "left " : "", d += L[L.length - 1].length > 0 ? "right " : ""; for (var I = 1; I < L.length - 1; I++) D += L[I].length === 0 ? "none " : L[I][0] ? "dashed " : "solid "; - return /[sd]/.test(D) && c.setAttribute("rowlines", D.trim()), d !== "" && (c = new ie.MathNode("menclose", [c]), c.setAttribute("notation", d.trim())), e.arraystretch && e.arraystretch < 1 && (c = new ie.MathNode("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c; + return /[sd]/.test(D) && c.setAttribute("rowlines", D.trim()), d !== "" && (c = new re.MathNode("menclose", [c]), c.setAttribute("notation", d.trim())), e.arraystretch && e.arraystretch < 1 && (c = new re.MathNode("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c; }, Wp = function(e, t) { e.envName.indexOf("ed") === -1 && m0(e); - var n = [], r = e.envName.indexOf("at") > -1 ? "alignat" : "align", s = e.envName === "split", a = Fr(e.parser, { + var n = [], i = e.envName.indexOf("at") > -1 ? "alignat" : "align", s = e.envName === "split", a = Fi(e.parser, { cols: n, addJot: !0, autoTag: s ? void 0 : Eh(e.envName), emptySingleRow: !0, - colSeparationType: r, + colSeparationType: i, maxNumCols: s ? 2 : void 0, leqno: e.parser.settings.leqno }, "display"), o, l = 0, u = { @@ -7173,14 +7173,14 @@ var qi = function(e, t) { } return a.colSeparationType = f ? "align" : "alignat", a; }; -zi({ +zr({ type: "array", names: ["array", "darray"], props: { numArgs: 1 }, - handler(i, e) { - var t = h0(e[0]), n = t ? [e[0]] : Ce(e[0], "ordgroup").body, r = n.map(function(a) { + handler(r, e) { + var t = h0(e[0]), n = t ? [e[0]] : Ce(e[0], "ordgroup").body, i = n.map(function(a) { var o = ph(a), l = o.text; if ("lcr".indexOf(l) !== -1) return { @@ -7199,23 +7199,23 @@ zi({ }; throw new ve("Unknown column alignment: " + l, a); }), s = { - cols: r, + cols: i, hskipBeforeAndAfter: !0, // \@preamble in lttab.dtx - maxNumCols: r.length + maxNumCols: i.length }; - return Fr(i.parser, s, Sh(i.envName)); + return Fi(r.parser, s, Sh(r.envName)); }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"], props: { numArgs: 0 }, - handler(i) { + handler(r) { var e = { matrix: null, pmatrix: ["(", ")"], @@ -7223,31 +7223,31 @@ zi({ Bmatrix: ["\\{", "\\}"], vmatrix: ["|", "|"], Vmatrix: ["\\Vert", "\\Vert"] - }[i.envName.replace("*", "")], t = "c", n = { + }[r.envName.replace("*", "")], t = "c", n = { hskipBeforeAndAfter: !1, cols: [{ type: "align", align: t }] }; - if (i.envName.charAt(i.envName.length - 1) === "*") { - var r = i.parser; - if (r.consumeSpaces(), r.fetch().text === "[") { - if (r.consume(), r.consumeSpaces(), t = r.fetch().text, "lcr".indexOf(t) === -1) - throw new ve("Expected l or c or r", r.nextToken); - r.consume(), r.consumeSpaces(), r.expect("]"), r.consume(), n.cols = [{ + if (r.envName.charAt(r.envName.length - 1) === "*") { + var i = r.parser; + if (i.consumeSpaces(), i.fetch().text === "[") { + if (i.consume(), i.consumeSpaces(), t = i.fetch().text, "lcr".indexOf(t) === -1) + throw new ve("Expected l or c or r", i.nextToken); + i.consume(), i.consumeSpaces(), i.expect("]"), i.consume(), n.cols = [{ type: "align", align: t }]; } } - var s = Fr(i.parser, n, Sh(i.envName)), a = Math.max(0, ...s.body.map((o) => o.length)); + var s = Fi(r.parser, n, Sh(r.envName)), a = Math.max(0, ...s.body.map((o) => o.length)); return s.cols = new Array(a).fill({ type: "align", align: t }), e ? { type: "leftright", - mode: i.mode, + mode: r.mode, body: [s], left: e[0], right: e[1], @@ -7255,32 +7255,32 @@ zi({ // \right uninfluenced by \color in array } : s; }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["smallmatrix"], props: { numArgs: 0 }, - handler(i) { + handler(r) { var e = { arraystretch: 0.5 - }, t = Fr(i.parser, e, "script"); + }, t = Fi(r.parser, e, "script"); return t.colSeparationType = "small", t; }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["subarray"], props: { numArgs: 1 }, - handler(i, e) { - var t = h0(e[0]), n = t ? [e[0]] : Ce(e[0], "ordgroup").body, r = n.map(function(a) { + handler(r, e) { + var t = h0(e[0]), n = t ? [e[0]] : Ce(e[0], "ordgroup").body, i = n.map(function(a) { var o = ph(a), l = o.text; if ("lc".indexOf(l) !== -1) return { @@ -7289,27 +7289,27 @@ zi({ }; throw new ve("Unknown column alignment: " + l, a); }); - if (r.length > 1) + if (i.length > 1) throw new ve("{subarray} can contain only one column"); var s = { - cols: r, + cols: i, hskipBeforeAndAfter: !1, arraystretch: 0.5 }; - if (s = Fr(i.parser, s, "script"), s.body.length > 0 && s.body[0].length > 1) + if (s = Fi(r.parser, s, "script"), s.body.length > 0 && s.body[0].length > 1) throw new ve("{subarray} can contain only one column"); return s; }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["cases", "dcases", "rcases", "drcases"], props: { numArgs: 0 }, - handler(i) { + handler(r) { var e = { arraystretch: 1.2, cols: [{ @@ -7328,37 +7328,37 @@ zi({ pregap: 0, postgap: 0 }] - }, t = Fr(i.parser, e, Sh(i.envName)); + }, t = Fi(r.parser, e, Sh(r.envName)); return { type: "leftright", - mode: i.mode, + mode: r.mode, body: [t], - left: i.envName.indexOf("r") > -1 ? "." : "\\{", - right: i.envName.indexOf("r") > -1 ? "\\}" : ".", + left: r.envName.indexOf("r") > -1 ? "." : "\\{", + right: r.envName.indexOf("r") > -1 ? "\\}" : ".", rightColor: void 0 }; }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["align", "align*", "aligned", "split"], props: { numArgs: 0 }, handler: Wp, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["gathered", "gather", "gather*"], props: { numArgs: 0 }, - handler(i) { - ["gather", "gather*"].includes(i.envName) && m0(i); + handler(r) { + ["gather", "gather*"].includes(r.envName) && m0(r); var e = { cols: [{ type: "align", @@ -7366,56 +7366,56 @@ zi({ }], addJot: !0, colSeparationType: "gather", - autoTag: Eh(i.envName), + autoTag: Eh(r.envName), emptySingleRow: !0, - leqno: i.parser.settings.leqno + leqno: r.parser.settings.leqno }; - return Fr(i.parser, e, "display"); + return Fi(r.parser, e, "display"); }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["alignat", "alignat*", "alignedat"], props: { numArgs: 1 }, handler: Wp, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["equation", "equation*"], props: { numArgs: 0 }, - handler(i) { - m0(i); + handler(r) { + m0(r); var e = { - autoTag: Eh(i.envName), + autoTag: Eh(r.envName), emptySingleRow: !0, singleRow: !0, maxNumCols: 1, - leqno: i.parser.settings.leqno + leqno: r.parser.settings.leqno }; - return Fr(i.parser, e, "display"); + return Fi(r.parser, e, "display"); }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); -zi({ +zr({ type: "array", names: ["CD"], props: { numArgs: 0 }, - handler(i) { - return m0(i), l3(i.parser); + handler(r) { + return m0(r), l3(r.parser); }, - htmlBuilder: qi, - mathmlBuilder: Vi + htmlBuilder: qr, + mathmlBuilder: Vr }); k("\\nonumber", "\\gdef\\@eqnsw{0}"); k("\\notag", "\\nonumber"); @@ -7428,8 +7428,8 @@ le({ allowedInText: !0, allowedInMath: !0 }, - handler(i, e) { - throw new ve(i.funcName + " valid only within array environment"); + handler(r, e) { + throw new ve(r.funcName + " valid only within array environment"); } }); var Qd = jp; @@ -7440,18 +7440,18 @@ le({ numArgs: 1, argTypes: ["text"] }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i, r = e[0]; - if (r.type !== "ordgroup") - throw new ve("Invalid environment name", r); - for (var s = "", a = 0; a < r.body.length; ++a) - s += Ce(r.body[a], "textord").text; + } = r, i = e[0]; + if (i.type !== "ordgroup") + throw new ve("Invalid environment name", i); + for (var s = "", a = 0; a < i.body.length; ++a) + s += Ce(i.body[a], "textord").text; if (n === "\\begin") { if (!Qd.hasOwnProperty(s)) - throw new ve("No such environment: " + s, r); + throw new ve("No such environment: " + s, i); var o = Qd[s], { args: l, optArgs: u @@ -7470,16 +7470,16 @@ le({ type: "environment", mode: t.mode, name: s, - nameGroup: r + nameGroup: i }; } }); -var Yp = (i, e) => { - var t = i.font, n = e.withFont(t); - return Ge(i.body, n); -}, Xp = (i, e) => { - var t = i.font, n = e.withFont(t); - return tt(i.body, n); +var Yp = (r, e) => { + var t = r.font, n = e.withFont(t); + return Ge(r.body, n); +}, Xp = (r, e) => { + var t = r.font, n = e.withFont(t); + return tt(r.body, n); }, Zd = { "\\Bbb": "\\mathbb", "\\bold": "\\mathbf", @@ -7511,16 +7511,16 @@ le({ numArgs: 1, allowedInArgument: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = bl(e[0]), s = n; + } = r, i = bl(e[0]), s = n; return s in Zd && (s = Zd[s]), { type: "font", mode: t.mode, font: s.slice(1), - body: r + body: i }; }, htmlBuilder: Yp, @@ -7532,10 +7532,10 @@ le({ props: { numArgs: 1 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = e[0], r = ze.isCharacterBox(n); + } = r, n = e[0], i = ze.isCharacterBox(n); return { type: "mclass", mode: t.mode, @@ -7546,7 +7546,7 @@ le({ font: "boldsymbol", body: n }], - isCharacterBox: r + isCharacterBox: i }; } }); @@ -7557,14 +7557,14 @@ le({ numArgs: 0, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n, - breakOnTokenText: r - } = i, { + breakOnTokenText: i + } = r, { mode: s - } = t, a = t.parseExpression(!0, r), o = "math" + n.slice(1); + } = t, a = t.parseExpression(!0, i), o = "math" + n.slice(1); return { type: "font", mode: s, @@ -7579,22 +7579,22 @@ le({ htmlBuilder: Yp, mathmlBuilder: Xp }); -var Qp = (i, e) => { +var Qp = (r, e) => { var t = e; - return i === "display" ? t = t.id >= Te.SCRIPT.id ? t.text() : Te.DISPLAY : i === "text" && t.size === Te.DISPLAY.size ? t = Te.TEXT : i === "script" ? t = Te.SCRIPT : i === "scriptscript" && (t = Te.SCRIPTSCRIPT), t; -}, Th = (i, e) => { - var t = Qp(i.size, e.style), n = t.fracNum(), r = t.fracDen(), s; + return r === "display" ? t = t.id >= Te.SCRIPT.id ? t.text() : Te.DISPLAY : r === "text" && t.size === Te.DISPLAY.size ? t = Te.TEXT : r === "script" ? t = Te.SCRIPT : r === "scriptscript" && (t = Te.SCRIPTSCRIPT), t; +}, Th = (r, e) => { + var t = Qp(r.size, e.style), n = t.fracNum(), i = t.fracDen(), s; s = e.havingStyle(n); - var a = Ge(i.numer, s, e); - if (i.continued) { + var a = Ge(r.numer, s, e); + if (r.continued) { var o = 8.5 / e.fontMetrics().ptPerEm, l = 3.5 / e.fontMetrics().ptPerEm; a.height = a.height < o ? o : a.height, a.depth = a.depth < l ? l : a.depth; } - s = e.havingStyle(r); - var u = Ge(i.denom, s, e), c, h, d; - i.hasBarLine ? (i.barSize ? (h = ht(i.barSize, e), c = z.makeLineSpan("frac-line", e, h)) : c = z.makeLineSpan("frac-line", e), h = c.height, d = c.height) : (c = null, h = 0, d = e.fontMetrics().defaultRuleThickness); + s = e.havingStyle(i); + var u = Ge(r.denom, s, e), c, h, d; + r.hasBarLine ? (r.barSize ? (h = ht(r.barSize, e), c = z.makeLineSpan("frac-line", e, h)) : c = z.makeLineSpan("frac-line", e), h = c.height, d = c.height) : (c = null, h = 0, d = e.fontMetrics().defaultRuleThickness); var f, m, g; - t.size === Te.DISPLAY.size || i.size === "display" ? (f = e.fontMetrics().num1, h > 0 ? m = 3 * d : m = 7 * d, g = e.fontMetrics().denom1) : (h > 0 ? (f = e.fontMetrics().num2, m = d) : (f = e.fontMetrics().num3, m = 3 * d), g = e.fontMetrics().denom2); + t.size === Te.DISPLAY.size || r.size === "display" ? (f = e.fontMetrics().num1, h > 0 ? m = 3 * d : m = 7 * d, g = e.fontMetrics().denom1) : (h > 0 ? (f = e.fontMetrics().num2, m = d) : (f = e.fontMetrics().num3, m = 3 * d), g = e.fontMetrics().denom2); var p; if (c) { var y = e.fontMetrics().axisHeight; @@ -7635,29 +7635,29 @@ var Qp = (i, e) => { var T; t.size === Te.DISPLAY.size ? T = e.fontMetrics().delim1 : t.size === Te.SCRIPTSCRIPT.size ? T = e.havingStyle(Te.SCRIPT).fontMetrics().delim2 : T = e.fontMetrics().delim2; var A, w; - return i.leftDelim == null ? A = Oa(e, ["mopen"]) : A = ar.customSizedDelim(i.leftDelim, T, !0, e.havingStyle(t), i.mode, ["mopen"]), i.continued ? w = z.makeSpan([]) : i.rightDelim == null ? w = Oa(e, ["mclose"]) : w = ar.customSizedDelim(i.rightDelim, T, !0, e.havingStyle(t), i.mode, ["mclose"]), z.makeSpan(["mord"].concat(s.sizingClasses(e)), [A, z.makeSpan(["mfrac"], [p]), w], e); -}, Ah = (i, e) => { - var t = new ie.MathNode("mfrac", [tt(i.numer, e), tt(i.denom, e)]); - if (!i.hasBarLine) + return r.leftDelim == null ? A = Oa(e, ["mopen"]) : A = ai.customSizedDelim(r.leftDelim, T, !0, e.havingStyle(t), r.mode, ["mopen"]), r.continued ? w = z.makeSpan([]) : r.rightDelim == null ? w = Oa(e, ["mclose"]) : w = ai.customSizedDelim(r.rightDelim, T, !0, e.havingStyle(t), r.mode, ["mclose"]), z.makeSpan(["mord"].concat(s.sizingClasses(e)), [A, z.makeSpan(["mfrac"], [p]), w], e); +}, Ah = (r, e) => { + var t = new re.MathNode("mfrac", [tt(r.numer, e), tt(r.denom, e)]); + if (!r.hasBarLine) t.setAttribute("linethickness", "0px"); - else if (i.barSize) { - var n = ht(i.barSize, e); + else if (r.barSize) { + var n = ht(r.barSize, e); t.setAttribute("linethickness", ae(n)); } - var r = Qp(i.size, e.style); - if (r.size !== e.style.size) { - t = new ie.MathNode("mstyle", [t]); - var s = r.size === Te.DISPLAY.size ? "true" : "false"; + var i = Qp(r.size, e.style); + if (i.size !== e.style.size) { + t = new re.MathNode("mstyle", [t]); + var s = i.size === Te.DISPLAY.size ? "true" : "false"; t.setAttribute("displaystyle", s), t.setAttribute("scriptlevel", "0"); } - if (i.leftDelim != null || i.rightDelim != null) { + if (r.leftDelim != null || r.rightDelim != null) { var a = []; - if (i.leftDelim != null) { - var o = new ie.MathNode("mo", [new ie.TextNode(i.leftDelim.replace("\\", ""))]); + if (r.leftDelim != null) { + var o = new re.MathNode("mo", [new re.TextNode(r.leftDelim.replace("\\", ""))]); o.setAttribute("fence", "true"), a.push(o); } - if (a.push(t), i.rightDelim != null) { - var l = new ie.MathNode("mo", [new ie.TextNode(i.rightDelim.replace("\\", ""))]); + if (a.push(t), r.rightDelim != null) { + var l = new re.MathNode("mo", [new re.TextNode(r.rightDelim.replace("\\", ""))]); l.setAttribute("fence", "true"), a.push(l); } return mh(a); @@ -7683,11 +7683,11 @@ le({ numArgs: 2, allowedInArgument: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = e[0], s = e[1], a, o = null, l = null, u = "auto"; + } = r, i = e[0], s = e[1], a, o = null, l = null, u = "auto"; switch (n) { case "\\dfrac": case "\\frac": @@ -7725,7 +7725,7 @@ le({ type: "genfrac", mode: t.mode, continued: !1, - numer: r, + numer: i, denom: s, hasBarLine: a, leftDelim: o, @@ -7743,16 +7743,16 @@ le({ props: { numArgs: 2 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = e[0], s = e[1]; + } = r, i = e[0], s = e[1]; return { type: "genfrac", mode: t.mode, continued: !0, - numer: r, + numer: i, denom: s, hasBarLine: !0, leftDelim: null, @@ -7769,27 +7769,27 @@ le({ numArgs: 0, infix: !0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t, token: n - } = i, r; + } = r, i; switch (t) { case "\\over": - r = "\\frac"; + i = "\\frac"; break; case "\\choose": - r = "\\binom"; + i = "\\binom"; break; case "\\atop": - r = "\\\\atopfrac"; + i = "\\\\atopfrac"; break; case "\\brace": - r = "\\\\bracefrac"; + i = "\\\\bracefrac"; break; case "\\brack": - r = "\\\\brackfrac"; + i = "\\\\brackfrac"; break; default: throw new Error("Unrecognized infix genfrac command"); @@ -7797,7 +7797,7 @@ le({ return { type: "infix", mode: e.mode, - replaceWith: r, + replaceWith: i, token: n }; } @@ -7814,10 +7814,10 @@ le({ allowedInArgument: !0, argTypes: ["math", "math", "size", "text", "math", "math"] }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i, n = e[4], r = e[5], s = bl(e[0]), a = s.type === "atom" && s.family === "open" ? ef(s.text) : null, o = bl(e[1]), l = o.type === "atom" && o.family === "close" ? ef(o.text) : null, u = Ce(e[2], "size"), c, h = null; + } = r, n = e[4], i = e[5], s = bl(e[0]), a = s.type === "atom" && s.family === "open" ? ef(s.text) : null, o = bl(e[1]), l = o.type === "atom" && o.family === "close" ? ef(o.text) : null, u = Ce(e[2], "size"), c, h = null; u.isBlank ? c = !0 : (h = u.value, c = h.number > 0); var d = "auto", f = e[3]; if (f.type === "ordgroup") { @@ -7831,7 +7831,7 @@ le({ type: "genfrac", mode: t.mode, numer: n, - denom: r, + denom: i, continued: !1, hasBarLine: c, barSize: h, @@ -7851,18 +7851,18 @@ le({ argTypes: ["size"], infix: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n, - token: r - } = i; + token: i + } = r; return { type: "infix", mode: t.mode, replaceWith: "\\\\abovefrac", size: Ce(e[0], "size").value, - token: r + token: i }; } }); @@ -7873,15 +7873,15 @@ le({ numArgs: 3, argTypes: ["math", "size", "math"] }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = e[0], s = iy(Ce(e[1], "infix").size), a = e[2], o = s.number > 0; + } = r, i = e[0], s = ry(Ce(e[1], "infix").size), a = e[2], o = s.number > 0; return { type: "genfrac", mode: t.mode, - numer: r, + numer: i, denom: a, continued: !1, hasBarLine: o, @@ -7894,11 +7894,11 @@ le({ htmlBuilder: Th, mathmlBuilder: Ah }); -var Zp = (i, e) => { - var t = e.style, n, r; - i.type === "supsub" ? (n = i.sup ? Ge(i.sup, e.havingStyle(t.sup()), e) : Ge(i.sub, e.havingStyle(t.sub()), e), r = Ce(i.base, "horizBrace")) : r = Ce(i, "horizBrace"); - var s = Ge(r.base, e.havingBaseStyle(Te.DISPLAY)), a = or.svgSpan(r, e), o; - if (r.isOver ? (o = z.makeVList({ +var Zp = (r, e) => { + var t = e.style, n, i; + r.type === "supsub" ? (n = r.sup ? Ge(r.sup, e.havingStyle(t.sup()), e) : Ge(r.sub, e.havingStyle(t.sub()), e), i = Ce(r.base, "horizBrace")) : i = Ce(r, "horizBrace"); + var s = Ge(i.base, e.havingBaseStyle(Te.DISPLAY)), a = oi.svgSpan(i, e), o; + if (i.isOver ? (o = z.makeVList({ positionType: "firstBaseline", children: [{ type: "elem", @@ -7924,8 +7924,8 @@ var Zp = (i, e) => { elem: s }] }, e), o.children[0].children[0].children[0].classes.push("svg-align")), n) { - var l = z.makeSpan(["mord", r.isOver ? "mover" : "munder"], [o], e); - r.isOver ? o = z.makeVList({ + var l = z.makeSpan(["mord", i.isOver ? "mover" : "munder"], [o], e); + i.isOver ? o = z.makeVList({ positionType: "firstBaseline", children: [{ type: "elem", @@ -7952,10 +7952,10 @@ var Zp = (i, e) => { }] }, e); } - return z.makeSpan(["mord", r.isOver ? "mover" : "munder"], [o], e); -}, A3 = (i, e) => { - var t = or.mathMLnode(i.label); - return new ie.MathNode(i.isOver ? "mover" : "munder", [tt(i.base, e), t]); + return z.makeSpan(["mord", i.isOver ? "mover" : "munder"], [o], e); +}, A3 = (r, e) => { + var t = oi.mathMLnode(r.label); + return new re.MathNode(r.isOver ? "mover" : "munder", [tt(r.base, e), t]); }; le({ type: "horizBrace", @@ -7963,11 +7963,11 @@ le({ props: { numArgs: 1 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i; + } = r; return { type: "horizBrace", mode: t.mode, @@ -7987,27 +7987,27 @@ le({ argTypes: ["url", "original"], allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = e[1], r = Ce(e[0], "url").url; + } = r, n = e[1], i = Ce(e[0], "url").url; return t.settings.isTrusted({ command: "\\href", - url: r + url: i }) ? { type: "href", mode: t.mode, - href: r, + href: i, body: At(n) } : t.formatUnsupportedCmd("\\href"); }, - htmlBuilder: (i, e) => { - var t = Wt(i.body, e, !1); - return z.makeAnchor(i.href, [], t, e); + htmlBuilder: (r, e) => { + var t = Wt(r.body, e, !1); + return z.makeAnchor(r.href, [], t, e); }, - mathmlBuilder: (i, e) => { - var t = Dr(i.body, e); - return t instanceof Kn || (t = new Kn("mrow", [t])), t.setAttribute("href", i.href), t; + mathmlBuilder: (r, e) => { + var t = Di(r.body, e); + return t instanceof Kn || (t = new Kn("mrow", [t])), t.setAttribute("href", r.href), t; } }); le({ @@ -8018,18 +8018,18 @@ le({ argTypes: ["url"], allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = Ce(e[0], "url").url; + } = r, n = Ce(e[0], "url").url; if (!t.settings.isTrusted({ command: "\\url", url: n })) return t.formatUnsupportedCmd("\\url"); - for (var r = [], s = 0; s < n.length; s++) { + for (var i = [], s = 0; s < n.length; s++) { var a = n[s]; - a === "~" && (a = "\\textasciitilde"), r.push({ + a === "~" && (a = "\\textasciitilde"), i.push({ type: "textord", mode: "text", text: a @@ -8039,7 +8039,7 @@ le({ type: "text", mode: t.mode, font: "\\texttt", - body: r + body: i }; return { type: "href", @@ -8058,22 +8058,22 @@ le({ allowedInText: !0, primitive: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "hbox", mode: t.mode, body: At(e[0]) }; }, - htmlBuilder(i, e) { - var t = Wt(i.body, e, !1); + htmlBuilder(r, e) { + var t = Wt(r.body, e, !1); return z.makeFragment(t); }, - mathmlBuilder(i, e) { - return new ie.MathNode("mrow", $n(i.body, e)); + mathmlBuilder(r, e) { + return new re.MathNode("mrow", $n(r.body, e)); } }); le({ @@ -8084,12 +8084,12 @@ le({ argTypes: ["raw", "original"], allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n, - token: r - } = i, s = Ce(e[0], "raw").string, a = e[1]; + token: i + } = r, s = Ce(e[0], "raw").string, a = e[1]; t.settings.strict && t.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode"); var o, l = {}; switch (n) { @@ -8135,15 +8135,15 @@ le({ body: At(a) } : t.formatUnsupportedCmd(n); }, - htmlBuilder: (i, e) => { - var t = Wt(i.body, e, !1), n = ["enclosing"]; - i.attributes.class && n.push(...i.attributes.class.trim().split(/\s+/)); - var r = z.makeSpan(n, t, e); - for (var s in i.attributes) - s !== "class" && i.attributes.hasOwnProperty(s) && r.setAttribute(s, i.attributes[s]); - return r; + htmlBuilder: (r, e) => { + var t = Wt(r.body, e, !1), n = ["enclosing"]; + r.attributes.class && n.push(...r.attributes.class.trim().split(/\s+/)); + var i = z.makeSpan(n, t, e); + for (var s in r.attributes) + s !== "class" && r.attributes.hasOwnProperty(s) && i.setAttribute(s, r.attributes[s]); + return i; }, - mathmlBuilder: (i, e) => Dr(i.body, e) + mathmlBuilder: (r, e) => Di(r.body, e) }); le({ type: "htmlmathml", @@ -8152,10 +8152,10 @@ le({ numArgs: 2, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i; + } = r; return { type: "htmlmathml", mode: t.mode, @@ -8163,11 +8163,11 @@ le({ mathml: At(e[1]) }; }, - htmlBuilder: (i, e) => { - var t = Wt(i.html, e, !1); + htmlBuilder: (r, e) => { + var t = Wt(r.html, e, !1); return z.makeFragment(t); }, - mathmlBuilder: (i, e) => Dr(i.mathml, e) + mathmlBuilder: (r, e) => Di(r.mathml, e) }); var q0 = function(e) { if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e)) @@ -8196,10 +8196,10 @@ le({ argTypes: ["raw", "url"], allowedInText: !1 }, - handler: (i, e, t) => { + handler: (r, e, t) => { var { parser: n - } = i, r = { + } = r, i = { number: 0, unit: "em" }, s = { @@ -8219,7 +8219,7 @@ le({ o = d; break; case "width": - r = q0(d); + i = q0(d); break; case "height": s = q0(d); @@ -8240,33 +8240,33 @@ le({ type: "includegraphics", mode: n.mode, alt: o, - width: r, + width: i, height: s, totalheight: a, src: f } : n.formatUnsupportedCmd("\\includegraphics"); }, - htmlBuilder: (i, e) => { - var t = ht(i.height, e), n = 0; - i.totalheight.number > 0 && (n = ht(i.totalheight, e) - t); - var r = 0; - i.width.number > 0 && (r = ht(i.width, e)); + htmlBuilder: (r, e) => { + var t = ht(r.height, e), n = 0; + r.totalheight.number > 0 && (n = ht(r.totalheight, e) - t); + var i = 0; + r.width.number > 0 && (i = ht(r.width, e)); var s = { height: ae(t + n) }; - r > 0 && (s.width = ae(r)), n > 0 && (s.verticalAlign = ae(-n)); - var a = new wy(i.src, i.alt, s); + i > 0 && (s.width = ae(i)), n > 0 && (s.verticalAlign = ae(-n)); + var a = new wy(r.src, r.alt, s); return a.height = t, a.depth = n, a; }, - mathmlBuilder: (i, e) => { - var t = new ie.MathNode("mglyph", []); - t.setAttribute("alt", i.alt); - var n = ht(i.height, e), r = 0; - if (i.totalheight.number > 0 && (r = ht(i.totalheight, e) - n, t.setAttribute("valign", ae(-r))), t.setAttribute("height", ae(n + r)), i.width.number > 0) { - var s = ht(i.width, e); + mathmlBuilder: (r, e) => { + var t = new re.MathNode("mglyph", []); + t.setAttribute("alt", r.alt); + var n = ht(r.height, e), i = 0; + if (r.totalheight.number > 0 && (i = ht(r.totalheight, e) - n, t.setAttribute("valign", ae(-i))), t.setAttribute("height", ae(n + i)), r.width.number > 0) { + var s = ht(r.width, e); t.setAttribute("width", ae(s)); } - return t.setAttribute("src", i.src), t; + return t.setAttribute("src", r.src), t; } }); le({ @@ -8278,27 +8278,27 @@ le({ primitive: !0, allowedInText: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i, r = Ce(e[0], "size"); + } = r, i = Ce(e[0], "size"); if (t.settings.strict) { - var s = n[1] === "m", a = r.value.unit === "mu"; - s ? (a || t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + n + " supports only mu units, " + ("not " + r.value.unit + " units")), t.mode !== "math" && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + n + " works only in math mode")) : a && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + n + " doesn't support mu units"); + var s = n[1] === "m", a = i.value.unit === "mu"; + s ? (a || t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + n + " supports only mu units, " + ("not " + i.value.unit + " units")), t.mode !== "math" && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + n + " works only in math mode")) : a && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + n + " doesn't support mu units"); } return { type: "kern", mode: t.mode, - dimension: r.value + dimension: i.value }; }, - htmlBuilder(i, e) { - return z.makeGlue(i.dimension, e); + htmlBuilder(r, e) { + return z.makeGlue(r.dimension, e); }, - mathmlBuilder(i, e) { - var t = ht(i.dimension, e); - return new ie.SpaceNode(t); + mathmlBuilder(r, e) { + var t = ht(r.dimension, e); + return new re.SpaceNode(t); } }); le({ @@ -8308,28 +8308,28 @@ le({ numArgs: 1, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = e[0]; + } = r, i = e[0]; return { type: "lap", mode: t.mode, alignment: n.slice(5), - body: r + body: i }; }, - htmlBuilder: (i, e) => { + htmlBuilder: (r, e) => { var t; - i.alignment === "clap" ? (t = z.makeSpan([], [Ge(i.body, e)]), t = z.makeSpan(["inner"], [t], e)) : t = z.makeSpan(["inner"], [Ge(i.body, e)]); - var n = z.makeSpan(["fix"], []), r = z.makeSpan([i.alignment], [t, n], e), s = z.makeSpan(["strut"]); - return s.style.height = ae(r.height + r.depth), r.depth && (s.style.verticalAlign = ae(-r.depth)), r.children.unshift(s), r = z.makeSpan(["thinbox"], [r], e), z.makeSpan(["mord", "vbox"], [r], e); - }, - mathmlBuilder: (i, e) => { - var t = new ie.MathNode("mpadded", [tt(i.body, e)]); - if (i.alignment !== "rlap") { - var n = i.alignment === "llap" ? "-1" : "-0.5"; + r.alignment === "clap" ? (t = z.makeSpan([], [Ge(r.body, e)]), t = z.makeSpan(["inner"], [t], e)) : t = z.makeSpan(["inner"], [Ge(r.body, e)]); + var n = z.makeSpan(["fix"], []), i = z.makeSpan([r.alignment], [t, n], e), s = z.makeSpan(["strut"]); + return s.style.height = ae(i.height + i.depth), i.depth && (s.style.verticalAlign = ae(-i.depth)), i.children.unshift(s), i = z.makeSpan(["thinbox"], [i], e), z.makeSpan(["mord", "vbox"], [i], e); + }, + mathmlBuilder: (r, e) => { + var t = new re.MathNode("mpadded", [tt(r.body, e)]); + if (r.alignment !== "rlap") { + var n = r.alignment === "llap" ? "-1" : "-0.5"; t.setAttribute("lspace", n + "width"); } return t.setAttribute("width", "0px"), t; @@ -8343,14 +8343,14 @@ le({ allowedInText: !0, allowedInMath: !1 }, - handler(i, e) { + handler(r, e) { var { funcName: t, parser: n - } = i, r = n.mode; + } = r, i = n.mode; n.switchMode("math"); var s = t === "\\(" ? "\\)" : "$", a = n.parseExpression(!1, s); - return n.expect(s), n.switchMode(r), { + return n.expect(s), n.switchMode(i), { type: "styling", mode: n.mode, style: "text", @@ -8367,22 +8367,22 @@ le({ allowedInText: !0, allowedInMath: !1 }, - handler(i, e) { - throw new ve("Mismatched " + i.funcName); + handler(r, e) { + throw new ve("Mismatched " + r.funcName); } }); -var tf = (i, e) => { +var tf = (r, e) => { switch (e.style.size) { case Te.DISPLAY.size: - return i.display; + return r.display; case Te.TEXT.size: - return i.text; + return r.text; case Te.SCRIPT.size: - return i.script; + return r.script; case Te.SCRIPTSCRIPT.size: - return i.scriptscript; + return r.scriptscript; default: - return i.text; + return r.text; } }; le({ @@ -8392,10 +8392,10 @@ le({ numArgs: 4, primitive: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i; + } = r; return { type: "mathchoice", mode: t.mode, @@ -8405,27 +8405,27 @@ le({ scriptscript: At(e[3]) }; }, - htmlBuilder: (i, e) => { - var t = tf(i, e), n = Wt(t, e, !1); + htmlBuilder: (r, e) => { + var t = tf(r, e), n = Wt(t, e, !1); return z.makeFragment(n); }, - mathmlBuilder: (i, e) => { - var t = tf(i, e); - return Dr(t, e); + mathmlBuilder: (r, e) => { + var t = tf(r, e); + return Di(t, e); } }); -var Jp = (i, e, t, n, r, s, a) => { - i = z.makeSpan([], [i]); +var Jp = (r, e, t, n, i, s, a) => { + r = z.makeSpan([], [r]); var o = t && ze.isCharacterBox(t), l, u; if (e) { - var c = Ge(e, n.havingStyle(r.sup()), n); + var c = Ge(e, n.havingStyle(i.sup()), n); u = { elem: c, kern: Math.max(n.fontMetrics().bigOpSpacing1, n.fontMetrics().bigOpSpacing3 - c.depth) }; } if (t) { - var h = Ge(t, n.havingStyle(r.sub()), n); + var h = Ge(t, n.havingStyle(i.sub()), n); l = { elem: h, kern: Math.max(n.fontMetrics().bigOpSpacing2, n.fontMetrics().bigOpSpacing4 - h.height) @@ -8433,7 +8433,7 @@ var Jp = (i, e, t, n, r, s, a) => { } var d; if (u && l) { - var f = n.fontMetrics().bigOpSpacing5 + l.elem.height + l.elem.depth + l.kern + i.depth + a; + var f = n.fontMetrics().bigOpSpacing5 + l.elem.height + l.elem.depth + l.kern + r.depth + a; d = z.makeVList({ positionType: "bottom", positionData: f, @@ -8449,7 +8449,7 @@ var Jp = (i, e, t, n, r, s, a) => { size: l.kern }, { type: "elem", - elem: i + elem: r }, { type: "kern", size: u.kern @@ -8463,7 +8463,7 @@ var Jp = (i, e, t, n, r, s, a) => { }] }, n); } else if (l) { - var m = i.height - a; + var m = r.height - a; d = z.makeVList({ positionType: "top", positionData: m, @@ -8479,17 +8479,17 @@ var Jp = (i, e, t, n, r, s, a) => { size: l.kern }, { type: "elem", - elem: i + elem: r }] }, n); } else if (u) { - var g = i.depth + a; + var g = r.depth + a; d = z.makeVList({ positionType: "bottom", positionData: g, children: [{ type: "elem", - elem: i + elem: r }, { type: "kern", size: u.kern @@ -8503,16 +8503,16 @@ var Jp = (i, e, t, n, r, s, a) => { }] }, n); } else - return i; + return r; var p = [d]; if (l && s !== 0 && !o) { var b = z.makeSpan(["mspace"], [], n); b.style.marginRight = ae(s), p.unshift(b); } return z.makeSpan(["mop", "op-limits"], p, n); -}, e_ = ["\\smallint"], na = (i, e) => { - var t, n, r = !1, s; - i.type === "supsub" ? (t = i.sup, n = i.sub, s = Ce(i.base, "op"), r = !0) : s = Ce(i, "op"); +}, e_ = ["\\smallint"], na = (r, e) => { + var t, n, i = !1, s; + r.type === "supsub" ? (t = r.sup, n = r.sub, s = Ce(r.base, "op"), i = !0) : s = Ce(r, "op"); var a = e.style, o = !1; a.size === Te.DISPLAY.size && s.symbol && !e_.includes(s.name) && (o = !0); var l; @@ -8535,24 +8535,24 @@ var Jp = (i, e, t, n, r, s, a) => { } } else if (s.body) { var f = Wt(s.body, e, !0); - f.length === 1 && f[0] instanceof Ui ? (l = f[0], l.classes[0] = "mop") : l = z.makeSpan(["mop"], f, e); + f.length === 1 && f[0] instanceof Ur ? (l = f[0], l.classes[0] = "mop") : l = z.makeSpan(["mop"], f, e); } else { for (var m = [], g = 1; g < s.name.length; g++) m.push(z.mathsym(s.name[g], s.mode, e)); l = z.makeSpan(["mop"], m, e); } var p = 0, b = 0; - return (l instanceof Ui || s.name === "\\oiint" || s.name === "\\oiiint") && !s.suppressBaseShift && (p = (l.height - l.depth) / 2 - e.fontMetrics().axisHeight, b = l.italic), r ? Jp(l, t, n, e, a, b, p) : (p && (l.style.position = "relative", l.style.top = ae(p)), l); -}, Ja = (i, e) => { + return (l instanceof Ur || s.name === "\\oiint" || s.name === "\\oiiint") && !s.suppressBaseShift && (p = (l.height - l.depth) / 2 - e.fontMetrics().axisHeight, b = l.italic), i ? Jp(l, t, n, e, a, b, p) : (p && (l.style.position = "relative", l.style.top = ae(p)), l); +}, Ja = (r, e) => { var t; - if (i.symbol) - t = new Kn("mo", [Qn(i.name, i.mode)]), e_.includes(i.name) && t.setAttribute("largeop", "false"); - else if (i.body) - t = new Kn("mo", $n(i.body, e)); + if (r.symbol) + t = new Kn("mo", [Qn(r.name, r.mode)]), e_.includes(r.name) && t.setAttribute("largeop", "false"); + else if (r.body) + t = new Kn("mo", $n(r.body, e)); else { - t = new Kn("mi", [new Li(i.name.slice(1))]); + t = new Kn("mi", [new Lr(r.name.slice(1))]); var n = new Kn("mo", [Qn("⁡", "text")]); - i.parentIsSupSub ? t = new Kn("mrow", [t, n]) : t = Rp([t, n]); + r.parentIsSupSub ? t = new Kn("mrow", [t, n]) : t = Rp([t, n]); } return t; }, x3 = { @@ -8575,18 +8575,18 @@ le({ props: { numArgs: 0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = n; - return r.length === 1 && (r = x3[r]), { + } = r, i = n; + return i.length === 1 && (i = x3[i]), { type: "op", mode: t.mode, limits: !0, parentIsSupSub: !1, symbol: !0, - name: r + name: i }; }, htmlBuilder: na, @@ -8599,10 +8599,10 @@ le({ numArgs: 1, primitive: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = e[0]; + } = r, n = e[0]; return { type: "op", mode: t.mode, @@ -8629,11 +8629,11 @@ le({ props: { numArgs: 0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i; + } = r; return { type: "op", mode: e.mode, @@ -8652,11 +8652,11 @@ le({ props: { numArgs: 0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i; + } = r; return { type: "op", mode: e.mode, @@ -8676,11 +8676,11 @@ le({ numArgs: 0, allowedInArgument: !0 }, - handler(i) { + handler(r) { var { parser: e, funcName: t - } = i, n = t; + } = r, n = t; return n.length === 1 && (n = w3[n]), { type: "op", mode: e.mode, @@ -8693,9 +8693,9 @@ le({ htmlBuilder: na, mathmlBuilder: Ja }); -var t_ = (i, e) => { - var t, n, r = !1, s; - i.type === "supsub" ? (t = i.sup, n = i.sub, s = Ce(i.base, "operatorname"), r = !0) : s = Ce(i, "operatorname"); +var t_ = (r, e) => { + var t, n, i = !1, s; + r.type === "supsub" ? (t = r.sup, n = r.sub, s = Ce(r.base, "operatorname"), i = !0) : s = Ce(r, "operatorname"); var a; if (s.body.length > 0) { for (var o = s.body.map((h) => { @@ -8707,16 +8707,16 @@ var t_ = (i, e) => { } : h; }), l = Wt(o, e.withFont("mathrm"), !0), u = 0; u < l.length; u++) { var c = l[u]; - c instanceof Ui && (c.text = c.text.replace(/\u2212/, "-").replace(/\u2217/, "*")); + c instanceof Ur && (c.text = c.text.replace(/\u2212/, "-").replace(/\u2217/, "*")); } a = z.makeSpan(["mop"], l, e); } else a = z.makeSpan(["mop"], [], e); - return r ? Jp(a, t, n, e, e.style, 0, 0) : a; -}, D3 = (i, e) => { - for (var t = $n(i.body, e.withFont("mathrm")), n = !0, r = 0; r < t.length; r++) { - var s = t[r]; - if (!(s instanceof ie.SpaceNode)) if (s instanceof ie.MathNode) + return i ? Jp(a, t, n, e, e.style, 0, 0) : a; +}, D3 = (r, e) => { + for (var t = $n(r.body, e.withFont("mathrm")), n = !0, i = 0; i < t.length; i++) { + var s = t[i]; + if (!(s instanceof re.SpaceNode)) if (s instanceof re.MathNode) switch (s.type) { case "mi": case "mn": @@ -8726,7 +8726,7 @@ var t_ = (i, e) => { break; case "mo": { var a = s.children[0]; - s.children.length === 1 && a instanceof ie.TextNode ? a.text = a.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : n = !1; + s.children.length === 1 && a instanceof re.TextNode ? a.text = a.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : n = !1; break; } default: @@ -8737,12 +8737,12 @@ var t_ = (i, e) => { } if (n) { var o = t.map((c) => c.toText()).join(""); - t = [new ie.TextNode(o)]; + t = [new re.TextNode(o)]; } - var l = new ie.MathNode("mi", t); + var l = new re.MathNode("mi", t); l.setAttribute("mathvariant", "normal"); - var u = new ie.MathNode("mo", [Qn("⁡", "text")]); - return i.parentIsSupSub ? new ie.MathNode("mrow", [l, u]) : ie.newDocumentFragment([l, u]); + var u = new re.MathNode("mo", [Qn("⁡", "text")]); + return r.parentIsSupSub ? new re.MathNode("mrow", [l, u]) : re.newDocumentFragment([l, u]); }; le({ type: "operatorname", @@ -8750,15 +8750,15 @@ le({ props: { numArgs: 1 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t, funcName: n - } = i, r = e[0]; + } = r, i = e[0]; return { type: "operatorname", mode: t.mode, - body: At(r), + body: At(i), alwaysHandleSupSub: n === "\\operatornamewithlimits", limits: !1, parentIsSupSub: !1 @@ -8770,11 +8770,11 @@ le({ k("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@"); fs({ type: "ordgroup", - htmlBuilder(i, e) { - return i.semisimple ? z.makeFragment(Wt(i.body, e, !1)) : z.makeSpan(["mord"], Wt(i.body, e, !0), e); + htmlBuilder(r, e) { + return r.semisimple ? z.makeFragment(Wt(r.body, e, !1)) : z.makeSpan(["mord"], Wt(r.body, e, !0), e); }, - mathmlBuilder(i, e) { - return Dr(i.body, e, !0); + mathmlBuilder(r, e) { + return Di(r.body, e, !0); } }); le({ @@ -8783,39 +8783,39 @@ le({ props: { numArgs: 1 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i, n = e[0]; + } = r, n = e[0]; return { type: "overline", mode: t.mode, body: n }; }, - htmlBuilder(i, e) { - var t = Ge(i.body, e.havingCrampedStyle()), n = z.makeLineSpan("overline-line", e), r = e.fontMetrics().defaultRuleThickness, s = z.makeVList({ + htmlBuilder(r, e) { + var t = Ge(r.body, e.havingCrampedStyle()), n = z.makeLineSpan("overline-line", e), i = e.fontMetrics().defaultRuleThickness, s = z.makeVList({ positionType: "firstBaseline", children: [{ type: "elem", elem: t }, { type: "kern", - size: 3 * r + size: 3 * i }, { type: "elem", elem: n }, { type: "kern", - size: r + size: i }] }, e); return z.makeSpan(["mord", "overline"], [s], e); }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mo", [new ie.TextNode("‾")]); + mathmlBuilder(r, e) { + var t = new re.MathNode("mo", [new re.TextNode("‾")]); t.setAttribute("stretchy", "true"); - var n = new ie.MathNode("mover", [tt(i.body, e), t]); + var n = new re.MathNode("mover", [tt(r.body, e), t]); return n.setAttribute("accent", "true"), n; } }); @@ -8826,23 +8826,23 @@ le({ numArgs: 1, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = e[0]; + } = r, n = e[0]; return { type: "phantom", mode: t.mode, body: At(n) }; }, - htmlBuilder: (i, e) => { - var t = Wt(i.body, e.withPhantom(), !1); + htmlBuilder: (r, e) => { + var t = Wt(r.body, e.withPhantom(), !1); return z.makeFragment(t); }, - mathmlBuilder: (i, e) => { - var t = $n(i.body, e); - return new ie.MathNode("mphantom", t); + mathmlBuilder: (r, e) => { + var t = $n(r.body, e); + return new re.MathNode("mphantom", t); } }); le({ @@ -8852,18 +8852,18 @@ le({ numArgs: 1, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = e[0]; + } = r, n = e[0]; return { type: "hphantom", mode: t.mode, body: n }; }, - htmlBuilder: (i, e) => { - var t = z.makeSpan([], [Ge(i.body, e.withPhantom())]); + htmlBuilder: (r, e) => { + var t = z.makeSpan([], [Ge(r.body, e.withPhantom())]); if (t.height = 0, t.depth = 0, t.children) for (var n = 0; n < t.children.length; n++) t.children[n].height = 0, t.children[n].depth = 0; @@ -8875,9 +8875,9 @@ le({ }] }, e), z.makeSpan(["mord"], [t], e); }, - mathmlBuilder: (i, e) => { - var t = $n(At(i.body), e), n = new ie.MathNode("mphantom", t), r = new ie.MathNode("mpadded", [n]); - return r.setAttribute("height", "0px"), r.setAttribute("depth", "0px"), r; + mathmlBuilder: (r, e) => { + var t = $n(At(r.body), e), n = new re.MathNode("mphantom", t), i = new re.MathNode("mpadded", [n]); + return i.setAttribute("height", "0px"), i.setAttribute("depth", "0px"), i; } }); le({ @@ -8887,23 +8887,23 @@ le({ numArgs: 1, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { parser: t - } = i, n = e[0]; + } = r, n = e[0]; return { type: "vphantom", mode: t.mode, body: n }; }, - htmlBuilder: (i, e) => { - var t = z.makeSpan(["inner"], [Ge(i.body, e.withPhantom())]), n = z.makeSpan(["fix"], []); + htmlBuilder: (r, e) => { + var t = z.makeSpan(["inner"], [Ge(r.body, e.withPhantom())]), n = z.makeSpan(["fix"], []); return z.makeSpan(["mord", "rlap"], [t, n], e); }, - mathmlBuilder: (i, e) => { - var t = $n(At(i.body), e), n = new ie.MathNode("mphantom", t), r = new ie.MathNode("mpadded", [n]); - return r.setAttribute("width", "0px"), r; + mathmlBuilder: (r, e) => { + var t = $n(At(r.body), e), n = new re.MathNode("mphantom", t), i = new re.MathNode("mpadded", [n]); + return i.setAttribute("width", "0px"), i; } }); le({ @@ -8914,19 +8914,19 @@ le({ argTypes: ["size", "hbox"], allowedInText: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i, n = Ce(e[0], "size").value, r = e[1]; + } = r, n = Ce(e[0], "size").value, i = e[1]; return { type: "raisebox", mode: t.mode, dy: n, - body: r + body: i }; }, - htmlBuilder(i, e) { - var t = Ge(i.body, e), n = ht(i.dy, e); + htmlBuilder(r, e) { + var t = Ge(r.body, e), n = ht(r.dy, e); return z.makeVList({ positionType: "shift", positionData: -n, @@ -8936,8 +8936,8 @@ le({ }] }, e); }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mpadded", [tt(i.body, e)]), n = i.dy.number + i.dy.unit; + mathmlBuilder(r, e) { + var t = new re.MathNode("mpadded", [tt(r.body, e)]), n = r.dy.number + r.dy.unit; return t.setAttribute("voffset", n), t; } }); @@ -8949,10 +8949,10 @@ le({ allowedInText: !0, allowedInArgument: !0 }, - handler(i) { + handler(r) { var { parser: e - } = i; + } = r; return { type: "internal", mode: e.mode @@ -8969,39 +8969,39 @@ le({ allowedInMath: !0, argTypes: ["size", "size", "size"] }, - handler(i, e, t) { + handler(r, e, t) { var { parser: n - } = i, r = t[0], s = Ce(e[0], "size"), a = Ce(e[1], "size"); + } = r, i = t[0], s = Ce(e[0], "size"), a = Ce(e[1], "size"); return { type: "rule", mode: n.mode, - shift: r && Ce(r, "size").value, + shift: i && Ce(i, "size").value, width: s.value, height: a.value }; }, - htmlBuilder(i, e) { - var t = z.makeSpan(["mord", "rule"], [], e), n = ht(i.width, e), r = ht(i.height, e), s = i.shift ? ht(i.shift, e) : 0; - return t.style.borderRightWidth = ae(n), t.style.borderTopWidth = ae(r), t.style.bottom = ae(s), t.width = n, t.height = r + s, t.depth = -s, t.maxFontSize = r * 1.125 * e.sizeMultiplier, t; + htmlBuilder(r, e) { + var t = z.makeSpan(["mord", "rule"], [], e), n = ht(r.width, e), i = ht(r.height, e), s = r.shift ? ht(r.shift, e) : 0; + return t.style.borderRightWidth = ae(n), t.style.borderTopWidth = ae(i), t.style.bottom = ae(s), t.width = n, t.height = i + s, t.depth = -s, t.maxFontSize = i * 1.125 * e.sizeMultiplier, t; }, - mathmlBuilder(i, e) { - var t = ht(i.width, e), n = ht(i.height, e), r = i.shift ? ht(i.shift, e) : 0, s = e.color && e.getColor() || "black", a = new ie.MathNode("mspace"); + mathmlBuilder(r, e) { + var t = ht(r.width, e), n = ht(r.height, e), i = r.shift ? ht(r.shift, e) : 0, s = e.color && e.getColor() || "black", a = new re.MathNode("mspace"); a.setAttribute("mathbackground", s), a.setAttribute("width", ae(t)), a.setAttribute("height", ae(n)); - var o = new ie.MathNode("mpadded", [a]); - return r >= 0 ? o.setAttribute("height", ae(r)) : (o.setAttribute("height", ae(r)), o.setAttribute("depth", ae(-r))), o.setAttribute("voffset", ae(r)), o; + var o = new re.MathNode("mpadded", [a]); + return i >= 0 ? o.setAttribute("height", ae(i)) : (o.setAttribute("height", ae(i)), o.setAttribute("depth", ae(-i))), o.setAttribute("voffset", ae(i)), o; } }); -function n_(i, e, t) { - for (var n = Wt(i, e, !1), r = e.sizeMultiplier / t.sizeMultiplier, s = 0; s < n.length; s++) { +function n_(r, e, t) { + for (var n = Wt(r, e, !1), i = e.sizeMultiplier / t.sizeMultiplier, s = 0; s < n.length; s++) { var a = n[s].classes.indexOf("sizing"); - a < 0 ? Array.prototype.push.apply(n[s].classes, e.sizingClasses(t)) : n[s].classes[a + 1] === "reset-size" + e.size && (n[s].classes[a + 1] = "reset-size" + t.size), n[s].height *= r, n[s].depth *= r; + a < 0 ? Array.prototype.push.apply(n[s].classes, e.sizingClasses(t)) : n[s].classes[a + 1] === "reset-size" + e.size && (n[s].classes[a + 1] = "reset-size" + t.size), n[s].height *= i, n[s].depth *= i; } return z.makeFragment(n); } -var nf = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"], k3 = (i, e) => { - var t = e.havingSize(i.size); - return n_(i.body, t, e); +var nf = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"], k3 = (r, e) => { + var t = e.havingSize(r.size); + return n_(r.body, t, e); }; le({ type: "sizing", @@ -9010,24 +9010,24 @@ le({ numArgs: 0, allowedInText: !0 }, - handler: (i, e) => { + handler: (r, e) => { var { breakOnTokenText: t, funcName: n, - parser: r - } = i, s = r.parseExpression(!1, t); + parser: i + } = r, s = i.parseExpression(!1, t); return { type: "sizing", - mode: r.mode, + mode: i.mode, // Figure out what size to use based on the list of functions above size: nf.indexOf(n) + 1, body: s }; }, htmlBuilder: k3, - mathmlBuilder: (i, e) => { - var t = e.havingSize(i.size), n = $n(i.body, t), r = new ie.MathNode("mstyle", n); - return r.setAttribute("mathsize", ae(t.sizeMultiplier)), r; + mathmlBuilder: (r, e) => { + var t = e.havingSize(r.size), n = $n(r.body, t), i = new re.MathNode("mstyle", n); + return i.setAttribute("mathsize", ae(t.sizeMultiplier)), i; } }); le({ @@ -9038,43 +9038,43 @@ le({ numOptionalArgs: 1, allowedInText: !0 }, - handler: (i, e, t) => { + handler: (r, e, t) => { var { parser: n - } = i, r = !1, s = !1, a = t[0] && Ce(t[0], "ordgroup"); + } = r, i = !1, s = !1, a = t[0] && Ce(t[0], "ordgroup"); if (a) for (var o = "", l = 0; l < a.body.length; ++l) { var u = a.body[l]; if (o = u.text, o === "t") - r = !0; + i = !0; else if (o === "b") s = !0; else { - r = !1, s = !1; + i = !1, s = !1; break; } } else - r = !0, s = !0; + i = !0, s = !0; var c = e[0]; return { type: "smash", mode: n.mode, body: c, - smashHeight: r, + smashHeight: i, smashDepth: s }; }, - htmlBuilder: (i, e) => { - var t = z.makeSpan([], [Ge(i.body, e)]); - if (!i.smashHeight && !i.smashDepth) + htmlBuilder: (r, e) => { + var t = z.makeSpan([], [Ge(r.body, e)]); + if (!r.smashHeight && !r.smashDepth) return t; - if (i.smashHeight && (t.height = 0, t.children)) + if (r.smashHeight && (t.height = 0, t.children)) for (var n = 0; n < t.children.length; n++) t.children[n].height = 0; - if (i.smashDepth && (t.depth = 0, t.children)) - for (var r = 0; r < t.children.length; r++) - t.children[r].depth = 0; + if (r.smashDepth && (t.depth = 0, t.children)) + for (var i = 0; i < t.children.length; i++) + t.children[i].depth = 0; var s = z.makeVList({ positionType: "firstBaseline", children: [{ @@ -9084,9 +9084,9 @@ le({ }, e); return z.makeSpan(["mord"], [s], e); }, - mathmlBuilder: (i, e) => { - var t = new ie.MathNode("mpadded", [tt(i.body, e)]); - return i.smashHeight && t.setAttribute("height", "0px"), i.smashDepth && t.setAttribute("depth", "0px"), t; + mathmlBuilder: (r, e) => { + var t = new re.MathNode("mpadded", [tt(r.body, e)]); + return r.smashHeight && t.setAttribute("height", "0px"), r.smashDepth && t.setAttribute("depth", "0px"), t; } }); le({ @@ -9096,27 +9096,27 @@ le({ numArgs: 1, numOptionalArgs: 1 }, - handler(i, e, t) { + handler(r, e, t) { var { parser: n - } = i, r = t[0], s = e[0]; + } = r, i = t[0], s = e[0]; return { type: "sqrt", mode: n.mode, body: s, - index: r + index: i }; }, - htmlBuilder(i, e) { - var t = Ge(i.body, e.havingCrampedStyle()); + htmlBuilder(r, e) { + var t = Ge(r.body, e.havingCrampedStyle()); t.height === 0 && (t.height = e.fontMetrics().xHeight), t = z.wrapFragment(t, e); - var n = e.fontMetrics(), r = n.defaultRuleThickness, s = r; + var n = e.fontMetrics(), i = n.defaultRuleThickness, s = i; e.style.id < Te.TEXT.id && (s = e.fontMetrics().xHeight); - var a = r + s / 4, o = t.height + t.depth + a + r, { + var a = i + s / 4, o = t.height + t.depth + a + i, { span: l, ruleWidth: u, advanceWidth: c - } = ar.sqrtImage(o, e), h = l.height - u; + } = ai.sqrtImage(o, e), h = l.height - u; h > t.height + t.depth + a && (a = (a + h - t.height - t.depth) / 2); var d = l.height - t.height - a - u; t.style.paddingLeft = ae(c); @@ -9137,8 +9137,8 @@ le({ size: u }] }, e); - if (i.index) { - var m = e.havingStyle(Te.SCRIPTSCRIPT), g = Ge(i.index, m, e), p = 0.6 * (f.height - f.depth), b = z.makeVList({ + if (r.index) { + var m = e.havingStyle(Te.SCRIPTSCRIPT), g = Ge(r.index, m, e), p = 0.6 * (f.height - f.depth), b = z.makeVList({ positionType: "shift", positionData: -p, children: [{ @@ -9150,12 +9150,12 @@ le({ } else return z.makeSpan(["mord", "sqrt"], [f], e); }, - mathmlBuilder(i, e) { + mathmlBuilder(r, e) { var { body: t, index: n - } = i; - return n ? new ie.MathNode("mroot", [tt(t, e), tt(n, e)]) : new ie.MathNode("msqrt", [tt(t, e)]); + } = r; + return n ? new re.MathNode("mroot", [tt(t, e), tt(n, e)]) : new re.MathNode("msqrt", [tt(t, e)]); } }); var rf = { @@ -9172,32 +9172,32 @@ le({ allowedInText: !0, primitive: !0 }, - handler(i, e) { + handler(r, e) { var { breakOnTokenText: t, funcName: n, - parser: r - } = i, s = r.parseExpression(!0, t), a = n.slice(1, n.length - 5); + parser: i + } = r, s = i.parseExpression(!0, t), a = n.slice(1, n.length - 5); return { type: "styling", - mode: r.mode, + mode: i.mode, // Figure out what style to use by pulling out the style from // the function name style: a, body: s }; }, - htmlBuilder(i, e) { - var t = rf[i.style], n = e.havingStyle(t).withFont(""); - return n_(i.body, n, e); + htmlBuilder(r, e) { + var t = rf[r.style], n = e.havingStyle(t).withFont(""); + return n_(r.body, n, e); }, - mathmlBuilder(i, e) { - var t = rf[i.style], n = e.havingStyle(t), r = $n(i.body, n), s = new ie.MathNode("mstyle", r), a = { + mathmlBuilder(r, e) { + var t = rf[r.style], n = e.havingStyle(t), i = $n(r.body, n), s = new re.MathNode("mstyle", i), a = { display: ["0", "true"], text: ["0", "false"], script: ["1", "false"], scriptscript: ["2", "false"] - }, o = a[i.style]; + }, o = a[r.style]; return s.setAttribute("scriptlevel", o[0]), s.setAttribute("displaystyle", o[1]), s; } }); @@ -9205,8 +9205,8 @@ var I3 = function(e, t) { var n = e.base; if (n) if (n.type === "op") { - var r = n.limits && (t.style.size === Te.DISPLAY.size || n.alwaysHandleSupSub); - return r ? na : null; + var i = n.limits && (t.style.size === Te.DISPLAY.size || n.alwaysHandleSupSub); + return i ? na : null; } else if (n.type === "operatorname") { var s = n.alwaysHandleSupSub && (t.style.size === Te.DISPLAY.size || n.limits); return s ? t_ : null; @@ -9223,18 +9223,18 @@ var I3 = function(e, t) { }; fs({ type: "supsub", - htmlBuilder(i, e) { - var t = I3(i, e); + htmlBuilder(r, e) { + var t = I3(r, e); if (t) - return t(i, e); + return t(r, e); var { base: n, - sup: r, + sup: i, sub: s - } = i, a = Ge(n, e), o, l, u = e.fontMetrics(), c = 0, h = 0, d = n && ze.isCharacterBox(n); - if (r) { + } = r, a = Ge(n, e), o, l, u = e.fontMetrics(), c = 0, h = 0, d = n && ze.isCharacterBox(n); + if (i) { var f = e.havingStyle(e.style.sup()); - o = Ge(r, f, e), d || (c = a.height - f.fontMetrics().supDrop * f.sizeMultiplier / e.sizeMultiplier); + o = Ge(i, f, e), d || (c = a.height - f.fontMetrics().supDrop * f.sizeMultiplier / e.sizeMultiplier); } if (s) { var m = e.havingStyle(e.style.sub()); @@ -9244,8 +9244,8 @@ fs({ e.style === Te.DISPLAY ? g = u.sup1 : e.style.cramped ? g = u.sup3 : g = u.sup2; var p = e.sizeMultiplier, b = ae(0.5 / u.ptPerEm / p), y = null; if (l) { - var v = i.base && i.base.type === "op" && i.base.name && (i.base.name === "\\oiint" || i.base.name === "\\oiiint"); - (a instanceof Ui || v) && (y = ae(-a.italic)); + var v = r.base && r.base.type === "op" && r.base.name && (r.base.name === "\\oiint" || r.base.name === "\\oiiint"); + (a instanceof Ur || v) && (y = ae(-a.italic)); } var T; if (o && l) { @@ -9300,66 +9300,66 @@ fs({ var R = dc(a, "right") || "mord"; return z.makeSpan([R], [a, z.makeSpan(["msupsub"], [T])], e); }, - mathmlBuilder(i, e) { - var t = !1, n, r; - i.base && i.base.type === "horizBrace" && (r = !!i.sup, r === i.base.isOver && (t = !0, n = i.base.isOver)), i.base && (i.base.type === "op" || i.base.type === "operatorname") && (i.base.parentIsSupSub = !0); - var s = [tt(i.base, e)]; - i.sub && s.push(tt(i.sub, e)), i.sup && s.push(tt(i.sup, e)); + mathmlBuilder(r, e) { + var t = !1, n, i; + r.base && r.base.type === "horizBrace" && (i = !!r.sup, i === r.base.isOver && (t = !0, n = r.base.isOver)), r.base && (r.base.type === "op" || r.base.type === "operatorname") && (r.base.parentIsSupSub = !0); + var s = [tt(r.base, e)]; + r.sub && s.push(tt(r.sub, e)), r.sup && s.push(tt(r.sup, e)); var a; if (t) a = n ? "mover" : "munder"; - else if (i.sub) - if (i.sup) { - var u = i.base; + else if (r.sub) + if (r.sup) { + var u = r.base; u && u.type === "op" && u.limits && e.style === Te.DISPLAY || u && u.type === "operatorname" && u.alwaysHandleSupSub && (e.style === Te.DISPLAY || u.limits) ? a = "munderover" : a = "msubsup"; } else { - var l = i.base; + var l = r.base; l && l.type === "op" && l.limits && (e.style === Te.DISPLAY || l.alwaysHandleSupSub) || l && l.type === "operatorname" && l.alwaysHandleSupSub && (l.limits || e.style === Te.DISPLAY) ? a = "munder" : a = "msub"; } else { - var o = i.base; + var o = r.base; o && o.type === "op" && o.limits && (e.style === Te.DISPLAY || o.alwaysHandleSupSub) || o && o.type === "operatorname" && o.alwaysHandleSupSub && (o.limits || e.style === Te.DISPLAY) ? a = "mover" : a = "msup"; } - return new ie.MathNode(a, s); + return new re.MathNode(a, s); } }); fs({ type: "atom", - htmlBuilder(i, e) { - return z.mathsym(i.text, i.mode, e, ["m" + i.family]); + htmlBuilder(r, e) { + return z.mathsym(r.text, r.mode, e, ["m" + r.family]); }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mo", [Qn(i.text, i.mode)]); - if (i.family === "bin") { - var n = gh(i, e); + mathmlBuilder(r, e) { + var t = new re.MathNode("mo", [Qn(r.text, r.mode)]); + if (r.family === "bin") { + var n = gh(r, e); n === "bold-italic" && t.setAttribute("mathvariant", n); - } else i.family === "punct" ? t.setAttribute("separator", "true") : (i.family === "open" || i.family === "close") && t.setAttribute("stretchy", "false"); + } else r.family === "punct" ? t.setAttribute("separator", "true") : (r.family === "open" || r.family === "close") && t.setAttribute("stretchy", "false"); return t; } }); -var i_ = { +var r_ = { mi: "italic", mn: "normal", mtext: "normal" }; fs({ type: "mathord", - htmlBuilder(i, e) { - return z.makeOrd(i, e, "mathord"); + htmlBuilder(r, e) { + return z.makeOrd(r, e, "mathord"); }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mi", [Qn(i.text, i.mode, e)]), n = gh(i, e) || "italic"; - return n !== i_[t.type] && t.setAttribute("mathvariant", n), t; + mathmlBuilder(r, e) { + var t = new re.MathNode("mi", [Qn(r.text, r.mode, e)]), n = gh(r, e) || "italic"; + return n !== r_[t.type] && t.setAttribute("mathvariant", n), t; } }); fs({ type: "textord", - htmlBuilder(i, e) { - return z.makeOrd(i, e, "textord"); + htmlBuilder(r, e) { + return z.makeOrd(r, e, "textord"); }, - mathmlBuilder(i, e) { - var t = Qn(i.text, i.mode, e), n = gh(i, e) || "normal", r; - return i.mode === "text" ? r = new ie.MathNode("mtext", [t]) : /[0-9]/.test(i.text) ? r = new ie.MathNode("mn", [t]) : i.text === "\\prime" ? r = new ie.MathNode("mo", [t]) : r = new ie.MathNode("mi", [t]), n !== i_[r.type] && r.setAttribute("mathvariant", n), r; + mathmlBuilder(r, e) { + var t = Qn(r.text, r.mode, e), n = gh(r, e) || "normal", i; + return r.mode === "text" ? i = new re.MathNode("mtext", [t]) : /[0-9]/.test(r.text) ? i = new re.MathNode("mn", [t]) : r.text === "\\prime" ? i = new re.MathNode("mo", [t]) : i = new re.MathNode("mi", [t]), n !== r_[i.type] && i.setAttribute("mathvariant", n), i; } }); var V0 = { @@ -9378,40 +9378,40 @@ var V0 = { }; fs({ type: "spacing", - htmlBuilder(i, e) { - if (K0.hasOwnProperty(i.text)) { - var t = K0[i.text].className || ""; - if (i.mode === "text") { - var n = z.makeOrd(i, e, "textord"); + htmlBuilder(r, e) { + if (K0.hasOwnProperty(r.text)) { + var t = K0[r.text].className || ""; + if (r.mode === "text") { + var n = z.makeOrd(r, e, "textord"); return n.classes.push(t), n; } else - return z.makeSpan(["mspace", t], [z.mathsym(i.text, i.mode, e)], e); + return z.makeSpan(["mspace", t], [z.mathsym(r.text, r.mode, e)], e); } else { - if (V0.hasOwnProperty(i.text)) - return z.makeSpan(["mspace", V0[i.text]], [], e); - throw new ve('Unknown type of space "' + i.text + '"'); + if (V0.hasOwnProperty(r.text)) + return z.makeSpan(["mspace", V0[r.text]], [], e); + throw new ve('Unknown type of space "' + r.text + '"'); } }, - mathmlBuilder(i, e) { + mathmlBuilder(r, e) { var t; - if (K0.hasOwnProperty(i.text)) - t = new ie.MathNode("mtext", [new ie.TextNode(" ")]); + if (K0.hasOwnProperty(r.text)) + t = new re.MathNode("mtext", [new re.TextNode(" ")]); else { - if (V0.hasOwnProperty(i.text)) - return new ie.MathNode("mspace"); - throw new ve('Unknown type of space "' + i.text + '"'); + if (V0.hasOwnProperty(r.text)) + return new re.MathNode("mspace"); + throw new ve('Unknown type of space "' + r.text + '"'); } return t; } }); var sf = () => { - var i = new ie.MathNode("mtd", []); - return i.setAttribute("width", "50%"), i; + var r = new re.MathNode("mtd", []); + return r.setAttribute("width", "50%"), r; }; fs({ type: "tag", - mathmlBuilder(i, e) { - var t = new ie.MathNode("mtable", [new ie.MathNode("mtr", [sf(), new ie.MathNode("mtd", [Dr(i.body, e)]), sf(), new ie.MathNode("mtd", [Dr(i.tag, e)])])]); + mathmlBuilder(r, e) { + var t = new re.MathNode("mtable", [new re.MathNode("mtr", [sf(), new re.MathNode("mtd", [Di(r.body, e)]), sf(), new re.MathNode("mtd", [Di(r.tag, e)])])]); return t.setAttribute("width", "100%"), t; } }); @@ -9427,8 +9427,8 @@ var af = { }, L3 = { "\\textit": "textit", "\\textup": "textup" -}, lf = (i, e) => { - var t = i.font; +}, lf = (r, e) => { + var t = r.font; if (t) { if (af[t]) return e.withTextFontFamily(af[t]); @@ -9462,25 +9462,25 @@ le({ allowedInArgument: !0, allowedInText: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t, funcName: n - } = i, r = e[0]; + } = r, i = e[0]; return { type: "text", mode: t.mode, - body: At(r), + body: At(i), font: n }; }, - htmlBuilder(i, e) { - var t = lf(i, e), n = Wt(i.body, t, !0); + htmlBuilder(r, e) { + var t = lf(r, e), n = Wt(r.body, t, !0); return z.makeSpan(["mord", "text"], n, t); }, - mathmlBuilder(i, e) { - var t = lf(i, e); - return Dr(i.body, t); + mathmlBuilder(r, e) { + var t = lf(r, e); + return Di(r.body, t); } }); le({ @@ -9490,29 +9490,29 @@ le({ numArgs: 1, allowedInText: !0 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "underline", mode: t.mode, body: e[0] }; }, - htmlBuilder(i, e) { - var t = Ge(i.body, e), n = z.makeLineSpan("underline-line", e), r = e.fontMetrics().defaultRuleThickness, s = z.makeVList({ + htmlBuilder(r, e) { + var t = Ge(r.body, e), n = z.makeLineSpan("underline-line", e), i = e.fontMetrics().defaultRuleThickness, s = z.makeVList({ positionType: "top", positionData: t.height, children: [{ type: "kern", - size: r + size: i }, { type: "elem", elem: n }, { type: "kern", - size: 3 * r + size: 3 * i }, { type: "elem", elem: t @@ -9520,10 +9520,10 @@ le({ }, e); return z.makeSpan(["mord", "underline"], [s], e); }, - mathmlBuilder(i, e) { - var t = new ie.MathNode("mo", [new ie.TextNode("‾")]); + mathmlBuilder(r, e) { + var t = new re.MathNode("mo", [new re.TextNode("‾")]); t.setAttribute("stretchy", "true"); - var n = new ie.MathNode("munder", [tt(i.body, e), t]); + var n = new re.MathNode("munder", [tt(r.body, e), t]); return n.setAttribute("accentunder", "true"), n; } }); @@ -9536,29 +9536,29 @@ le({ // In LaTeX, \vcenter can act only on a box. allowedInText: !1 }, - handler(i, e) { + handler(r, e) { var { parser: t - } = i; + } = r; return { type: "vcenter", mode: t.mode, body: e[0] }; }, - htmlBuilder(i, e) { - var t = Ge(i.body, e), n = e.fontMetrics().axisHeight, r = 0.5 * (t.height - n - (t.depth + n)); + htmlBuilder(r, e) { + var t = Ge(r.body, e), n = e.fontMetrics().axisHeight, i = 0.5 * (t.height - n - (t.depth + n)); return z.makeVList({ positionType: "shift", - positionData: r, + positionData: i, children: [{ type: "elem", elem: t }] }, e); }, - mathmlBuilder(i, e) { - return new ie.MathNode("mpadded", [tt(i.body, e)], ["vcenter"]); + mathmlBuilder(r, e) { + return new re.MathNode("mpadded", [tt(r.body, e)], ["vcenter"]); } }); le({ @@ -9568,54 +9568,54 @@ le({ numArgs: 0, allowedInText: !0 }, - handler(i, e, t) { + handler(r, e, t) { throw new ve("\\verb ended by end of line instead of matching delimiter"); }, - htmlBuilder(i, e) { - for (var t = uf(i), n = [], r = e.havingStyle(e.style.text()), s = 0; s < t.length; s++) { + htmlBuilder(r, e) { + for (var t = uf(r), n = [], i = e.havingStyle(e.style.text()), s = 0; s < t.length; s++) { var a = t[s]; - a === "~" && (a = "\\textasciitilde"), n.push(z.makeSymbol(a, "Typewriter-Regular", i.mode, r, ["mord", "texttt"])); + a === "~" && (a = "\\textasciitilde"), n.push(z.makeSymbol(a, "Typewriter-Regular", r.mode, i, ["mord", "texttt"])); } - return z.makeSpan(["mord", "text"].concat(r.sizingClasses(e)), z.tryCombineChars(n), r); + return z.makeSpan(["mord", "text"].concat(i.sizingClasses(e)), z.tryCombineChars(n), i); }, - mathmlBuilder(i, e) { - var t = new ie.TextNode(uf(i)), n = new ie.MathNode("mtext", [t]); + mathmlBuilder(r, e) { + var t = new re.TextNode(uf(r)), n = new re.MathNode("mtext", [t]); return n.setAttribute("mathvariant", "monospace"), n; } }); -var uf = (i) => i.body.replace(/ /g, i.star ? "␣" : " "), R3 = Ip; -k("\\noexpand", function(i) { - var e = i.popToken(); - return i.isExpandable(e.text) && (e.noexpand = !0, e.treatAsRelax = !0), { +var uf = (r) => r.body.replace(/ /g, r.star ? "␣" : " "), R3 = Ip; +k("\\noexpand", function(r) { + var e = r.popToken(); + return r.isExpandable(e.text) && (e.noexpand = !0, e.treatAsRelax = !0), { tokens: [e], numArgs: 0 }; }); -k("\\expandafter", function(i) { - var e = i.popToken(); - return i.expandOnce(!0), { +k("\\expandafter", function(r) { + var e = r.popToken(); + return r.expandOnce(!0), { tokens: [e], numArgs: 0 }; }); -k("\\@firstoftwo", function(i) { - var e = i.consumeArgs(2); +k("\\@firstoftwo", function(r) { + var e = r.consumeArgs(2); return { tokens: e[0], numArgs: 0 }; }); -k("\\@secondoftwo", function(i) { - var e = i.consumeArgs(2); +k("\\@secondoftwo", function(r) { + var e = r.consumeArgs(2); return { tokens: e[1], numArgs: 0 }; }); -k("\\@ifnextchar", function(i) { - var e = i.consumeArgs(3); - i.consumeSpaces(); - var t = i.future(); +k("\\@ifnextchar", function(r) { + var e = r.consumeArgs(3); + r.consumeSpaces(); + var t = r.future(); return e[0].length === 1 && e[0][0].text === t.text ? { tokens: e[1], numArgs: 0 @@ -9625,9 +9625,9 @@ k("\\@ifnextchar", function(i) { }; }); k("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"); -k("\\TextOrMath", function(i) { - var e = i.consumeArgs(2); - return i.mode === "text" ? { +k("\\TextOrMath", function(r) { + var e = r.consumeArgs(2); + return r.mode === "text" ? { tokens: e[0], numArgs: 0 } : { @@ -9659,14 +9659,14 @@ var cf = { f: 15, F: 15 }; -k("\\char", function(i) { - var e = i.popToken(), t, n = ""; +k("\\char", function(r) { + var e = r.popToken(), t, n = ""; if (e.text === "'") - t = 8, e = i.popToken(); + t = 8, e = r.popToken(); else if (e.text === '"') - t = 16, e = i.popToken(); + t = 16, e = r.popToken(); else if (e.text === "`") - if (e = i.popToken(), e.text[0] === "\\") + if (e = r.popToken(), e.text[0] === "\\") n = e.text.charCodeAt(1); else { if (e.text === "EOF") @@ -9678,47 +9678,47 @@ k("\\char", function(i) { if (t) { if (n = cf[e.text], n == null || n >= t) throw new ve("Invalid base-" + t + " digit " + e.text); - for (var r; (r = cf[i.future().text]) != null && r < t; ) - n *= t, n += r, i.popToken(); + for (var i; (i = cf[r.future().text]) != null && i < t; ) + n *= t, n += i, r.popToken(); } return "\\@char{" + n + "}"; }); -var xh = (i, e, t, n) => { - var r = i.consumeArg().tokens; - if (r.length !== 1) +var xh = (r, e, t, n) => { + var i = r.consumeArg().tokens; + if (i.length !== 1) throw new ve("\\newcommand's first argument must be a macro name"); - var s = r[0].text, a = i.isDefined(s); + var s = i[0].text, a = r.isDefined(s); if (a && !e) throw new ve("\\newcommand{" + s + "} attempting to redefine " + (s + "; use \\renewcommand")); if (!a && !t) throw new ve("\\renewcommand{" + s + "} when command " + s + " does not yet exist; use \\newcommand"); var o = 0; - if (r = i.consumeArg().tokens, r.length === 1 && r[0].text === "[") { - for (var l = "", u = i.expandNextToken(); u.text !== "]" && u.text !== "EOF"; ) - l += u.text, u = i.expandNextToken(); + if (i = r.consumeArg().tokens, i.length === 1 && i[0].text === "[") { + for (var l = "", u = r.expandNextToken(); u.text !== "]" && u.text !== "EOF"; ) + l += u.text, u = r.expandNextToken(); if (!l.match(/^\s*[0-9]+\s*$/)) throw new ve("Invalid number of arguments: " + l); - o = parseInt(l), r = i.consumeArg().tokens; + o = parseInt(l), i = r.consumeArg().tokens; } - return a && n || i.macros.set(s, { - tokens: r, + return a && n || r.macros.set(s, { + tokens: i, numArgs: o }), ""; }; -k("\\newcommand", (i) => xh(i, !1, !0, !1)); -k("\\renewcommand", (i) => xh(i, !0, !1, !1)); -k("\\providecommand", (i) => xh(i, !0, !0, !0)); -k("\\message", (i) => { - var e = i.consumeArgs(1)[0]; +k("\\newcommand", (r) => xh(r, !1, !0, !1)); +k("\\renewcommand", (r) => xh(r, !0, !1, !1)); +k("\\providecommand", (r) => xh(r, !0, !0, !0)); +k("\\message", (r) => { + var e = r.consumeArgs(1)[0]; return console.log(e.reverse().map((t) => t.text).join("")), ""; }); -k("\\errmessage", (i) => { - var e = i.consumeArgs(1)[0]; +k("\\errmessage", (r) => { + var e = r.consumeArgs(1)[0]; return console.error(e.reverse().map((t) => t.text).join("")), ""; }); -k("\\show", (i) => { - var e = i.popToken(), t = e.text; - return console.log(e, i.macros.get(t), R3[t], xt.math[t], xt.text[t]), ""; +k("\\show", (r) => { + var e = r.popToken(), t = e.text; + return console.log(e, r.macros.get(t), R3[t], xt.math[t], xt.text[t]), ""; }); k("\\bgroup", "{"); k("\\egroup", "}"); @@ -9851,8 +9851,8 @@ var hf = { // Symbols whose definition starts with \DOTSX: "\\DOTSX": "\\dotsx" }; -k("\\dots", function(i) { - var e = "\\dotso", t = i.expandAfterFuture().text; +k("\\dots", function(r) { + var e = "\\dotso", t = r.expandAfterFuture().text; return t in hf ? e = hf[t] : (t.slice(0, 4) === "\\not" || t in xt.math && ["bin", "rel"].includes(xt.math[t].group)) && (e = "\\dotsb"), e; }); var wh = { @@ -9879,16 +9879,16 @@ var wh = { ".": !0, ",": !0 }; -k("\\dotso", function(i) { - var e = i.future().text; +k("\\dotso", function(r) { + var e = r.future().text; return e in wh ? "\\ldots\\," : "\\ldots"; }); -k("\\dotsc", function(i) { - var e = i.future().text; +k("\\dotsc", function(r) { + var e = r.future().text; return e in wh && e !== "," ? "\\ldots\\," : "\\ldots"; }); -k("\\cdots", function(i) { - var e = i.future().text; +k("\\cdots", function(r) { + var e = r.future().text; return e in wh ? "\\@cdots\\," : "\\@cdots"; }); k("\\dotsb", "\\cdots"); @@ -9916,8 +9916,8 @@ k("\\quad", "\\hskip1em\\relax"); k("\\qquad", "\\hskip2em\\relax"); k("\\tag", "\\@ifstar\\tag@literal\\tag@paren"); k("\\tag@paren", "\\tag@literal{({#1})}"); -k("\\tag@literal", (i) => { - if (i.macros.get("\\df@tag")) +k("\\tag@literal", (r) => { + if (r.macros.get("\\df@tag")) throw new ve("Multiple \\tag"); return "\\gdef\\df@tag{\\text{#1}}"; }); @@ -9927,9 +9927,9 @@ k("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"); k("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"); k("\\newline", "\\\\\\relax"); k("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"); -var r_ = ae(rr["Main-Regular"][84][1] - 0.7 * rr["Main-Regular"][65][1]); -k("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + r_ + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"); -k("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + r_ + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"); +var i_ = ae(ii["Main-Regular"][84][1] - 0.7 * ii["Main-Regular"][65][1]); +k("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + i_ + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"); +k("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + i_ + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"); k("\\hspace", "\\@ifstar\\@hspacer\\@hspace"); k("\\@hspace", "\\hskip #1\\relax"); k("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"); @@ -10075,22 +10075,22 @@ k("\\ket", "\\mathinner{|{#1}\\rangle}"); k("\\braket", "\\mathinner{\\langle{#1}\\rangle}"); k("\\Bra", "\\left\\langle#1\\right|"); k("\\Ket", "\\left|#1\\right\\rangle"); -var s_ = (i) => (e) => { - var t = e.consumeArg().tokens, n = e.consumeArg().tokens, r = e.consumeArg().tokens, s = e.consumeArg().tokens, a = e.macros.get("|"), o = e.macros.get("\\|"); +var s_ = (r) => (e) => { + var t = e.consumeArg().tokens, n = e.consumeArg().tokens, i = e.consumeArg().tokens, s = e.consumeArg().tokens, a = e.macros.get("|"), o = e.macros.get("\\|"); e.macros.beginGroup(); var l = (h) => (d) => { - i && (d.macros.set("|", a), r.length && d.macros.set("\\|", o)); + r && (d.macros.set("|", a), i.length && d.macros.set("\\|", o)); var f = h; - if (!h && r.length) { + if (!h && i.length) { var m = d.future(); m.text === "|" && (d.popToken(), f = !0); } return { - tokens: f ? r : n, + tokens: f ? i : n, numArgs: 0 }; }; - e.macros.set("|", l(!1)), r.length && e.macros.set("\\|", l(!0)); + e.macros.set("|", l(!1)), i.length && e.macros.set("\\|", l(!0)); var u = e.consumeArg().tokens, c = e.expandTokens([ ...s, ...u, @@ -10180,8 +10180,8 @@ function Dh() { }; } let ms = Dh(); -function a_(i) { - ms = i; +function a_(r) { + ms = r; } const o_ = /[&<>"']/, C3 = new RegExp(o_.source, "g"), l_ = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, F3 = new RegExp(l_.source, "g"), P3 = { "&": "&", @@ -10189,89 +10189,89 @@ const o_ = /[&<>"']/, C3 = new RegExp(o_.source, "g"), l_ = /[<>"']|&(?!(#\d{1,7 ">": ">", '"': """, "'": "'" -}, df = (i) => P3[i]; -function Ln(i, e) { +}, df = (r) => P3[r]; +function Ln(r, e) { if (e) { - if (o_.test(i)) - return i.replace(C3, df); - } else if (l_.test(i)) - return i.replace(F3, df); - return i; + if (o_.test(r)) + return r.replace(C3, df); + } else if (l_.test(r)) + return r.replace(F3, df); + return r; } const M3 = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; -function O3(i) { - return i.replace(M3, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : "")); +function O3(r) { + return r.replace(M3, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : "")); } const B3 = /(^|[^\[])\^/g; -function Ze(i, e) { - let t = typeof i == "string" ? i : i.source; +function Ze(r, e) { + let t = typeof r == "string" ? r : r.source; e = e || ""; const n = { - replace: (r, s) => { + replace: (i, s) => { let a = typeof s == "string" ? s : s.source; - return a = a.replace(B3, "$1"), t = t.replace(r, a), n; + return a = a.replace(B3, "$1"), t = t.replace(i, a), n; }, getRegex: () => new RegExp(t, e) }; return n; } -function ff(i) { +function ff(r) { try { - i = encodeURI(i).replace(/%25/g, "%"); + r = encodeURI(r).replace(/%25/g, "%"); } catch { return null; } - return i; + return r; } const Da = { exec: () => null }; -function mf(i, e) { - const t = i.replace(/\|/g, (s, a, o) => { +function mf(r, e) { + const t = r.replace(/\|/g, (s, a, o) => { let l = !1, u = a; for (; --u >= 0 && o[u] === "\\"; ) l = !l; return l ? "|" : " |"; }), n = t.split(/ \|/); - let r = 0; + let i = 0; if (n[0].trim() || n.shift(), n.length > 0 && !n[n.length - 1].trim() && n.pop(), e) if (n.length > e) n.splice(e); else for (; n.length < e; ) n.push(""); - for (; r < n.length; r++) - n[r] = n[r].trim().replace(/\\\|/g, "|"); + for (; i < n.length; i++) + n[i] = n[i].trim().replace(/\\\|/g, "|"); return n; } -function Eo(i, e, t) { - const n = i.length; +function Eo(r, e, t) { + const n = r.length; if (n === 0) return ""; - let r = 0; - for (; r < n && i.charAt(n - r - 1) === e; ) - r++; - return i.slice(0, n - r); + let i = 0; + for (; i < n && r.charAt(n - i - 1) === e; ) + i++; + return r.slice(0, n - i); } -function N3(i, e) { - if (i.indexOf(e[1]) === -1) +function N3(r, e) { + if (r.indexOf(e[1]) === -1) return -1; let t = 0; - for (let n = 0; n < i.length; n++) - if (i[n] === "\\") + for (let n = 0; n < r.length; n++) + if (r[n] === "\\") n++; - else if (i[n] === e[0]) + else if (r[n] === e[0]) t++; - else if (i[n] === e[1] && (t--, t < 0)) + else if (r[n] === e[1] && (t--, t < 0)) return n; return -1; } -function gf(i, e, t, n) { - const r = e.href, s = e.title ? Ln(e.title) : null, a = i[1].replace(/\\([\[\]])/g, "$1"); - if (i[0].charAt(0) !== "!") { +function gf(r, e, t, n) { + const i = e.href, s = e.title ? Ln(e.title) : null, a = r[1].replace(/\\([\[\]])/g, "$1"); + if (r[0].charAt(0) !== "!") { n.state.inLink = !0; const o = { type: "link", raw: t, - href: r, + href: i, title: s, text: a, tokens: n.inlineTokens(a) @@ -10281,33 +10281,33 @@ function gf(i, e, t, n) { return { type: "image", raw: t, - href: r, + href: i, title: s, text: Ln(a) }; } -function $3(i, e) { - const t = i.match(/^(\s+)(?:```)/); +function $3(r, e) { + const t = r.match(/^(\s+)(?:```)/); if (t === null) return e; const n = t[1]; return e.split(` -`).map((r) => { - const s = r.match(/^\s+/); +`).map((i) => { + const s = i.match(/^\s+/); if (s === null) - return r; + return i; const [a] = s; - return a.length >= n.length ? r.slice(n.length) : r; + return a.length >= n.length ? i.slice(n.length) : i; }).join(` `); } class El { // set by the lexer constructor(e) { - it(this, "options"); - it(this, "rules"); + rt(this, "options"); + rt(this, "rules"); // set by the lexer - it(this, "lexer"); + rt(this, "lexer"); this.options = e || ms; } space(e) { @@ -10334,12 +10334,12 @@ class El { fences(e) { const t = this.rules.block.fences.exec(e); if (t) { - const n = t[0], r = $3(n, t[3] || ""); + const n = t[0], i = $3(n, t[3] || ""); return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], - text: r + text: i }; } } @@ -10348,8 +10348,8 @@ class El { if (t) { let n = t[2].trim(); if (/#$/.test(n)) { - const r = Eo(n, "#"); - (this.options.pedantic || !r || / $/.test(r)) && (n = r.trim()); + const i = Eo(n, "#"); + (this.options.pedantic || !i || / $/.test(i)) && (n = i.trim()); } return { type: "heading", @@ -10375,10 +10375,10 @@ class El { $1`); n = Eo(n.replace(/^ *>[ \t]?/gm, ""), ` `); - const r = this.lexer.state.top; + const i = this.lexer.state.top; this.lexer.state.top = !0; const s = this.lexer.blockTokens(n); - return this.lexer.state.top = r, { + return this.lexer.state.top = i, { type: "blockquote", raw: t[0], tokens: s, @@ -10390,15 +10390,15 @@ class El { let t = this.rules.block.list.exec(e); if (t) { let n = t[1].trim(); - const r = n.length > 1, s = { + const i = n.length > 1, s = { type: "list", raw: "", - ordered: r, - start: r ? +n.slice(0, -1) : "", + ordered: i, + start: i ? +n.slice(0, -1) : "", loose: !1, items: [] }; - n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]"); + n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]"); const a = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`); let o = "", l = "", u = !1; for (; e; ) { @@ -10470,12 +10470,12 @@ class El { def(e) { const t = this.rules.block.def.exec(e); if (t) { - const n = t[1].toLowerCase().replace(/\s+/g, " "), r = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", s = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3]; + const n = t[1].toLowerCase().replace(/\s+/g, " "), i = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", s = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3]; return { type: "def", tag: n, raw: t[0], - href: r, + href: i, title: s }; } @@ -10484,7 +10484,7 @@ class El { const t = this.rules.block.table.exec(e); if (!t || !/[:|]/.test(t[2])) return; - const n = mf(t[1]), r = t[2].replace(/^\||\| *$/g, "").split("|"), s = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(` + const n = mf(t[1]), i = t[2].replace(/^\||\| *$/g, "").split("|"), s = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(` `) : [], a = { type: "table", raw: t[0], @@ -10492,8 +10492,8 @@ class El { align: [], rows: [] }; - if (n.length === r.length) { - for (const o of r) + if (n.length === i.length) { + for (const o of i) /^ *-+: *$/.test(o) ? a.align.push("right") : /^ *:-+: *$/.test(o) ? a.align.push("center") : /^ *:-+ *$/.test(o) ? a.align.push("left") : a.align.push(null); for (const o of n) a.header.push({ @@ -10580,14 +10580,14 @@ class El { t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, l).trim(), t[3] = ""; } } - let r = t[2], s = ""; + let i = t[2], s = ""; if (this.options.pedantic) { - const a = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r); - a && (r = a[1], s = a[3]); + const a = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i); + a && (i = a[1], s = a[3]); } else s = t[3] ? t[3].slice(1, -1) : ""; - return r = r.trim(), /^$/.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), gf(t, { - href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), + return i = i.trim(), /^$/.test(n) ? i = i.slice(1) : i = i.slice(1, -1)), gf(t, { + href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer); } @@ -10595,7 +10595,7 @@ class El { reflink(e, t) { let n; if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) { - const r = (n[2] || n[1]).replace(/\s+/g, " "), s = t[r.toLowerCase()]; + const i = (n[2] || n[1]).replace(/\s+/g, " "), s = t[i.toLowerCase()]; if (!s) { const a = n[0].charAt(0); return { @@ -10608,27 +10608,27 @@ class El { } } emStrong(e, t, n = "") { - let r = this.rules.inline.emStrongLDelim.exec(e); - if (!r || r[3] && n.match(/[\p{L}\p{N}]/u)) + let i = this.rules.inline.emStrongLDelim.exec(e); + if (!i || i[3] && n.match(/[\p{L}\p{N}]/u)) return; - if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) { - const a = [...r[0]].length - 1; + if (!(i[1] || i[2] || "") || !n || this.rules.inline.punctuation.exec(n)) { + const a = [...i[0]].length - 1; let o, l, u = a, c = 0; - const h = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; - for (h.lastIndex = 0, t = t.slice(-1 * e.length + a); (r = h.exec(t)) != null; ) { - if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) + const h = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; + for (h.lastIndex = 0, t = t.slice(-1 * e.length + a); (i = h.exec(t)) != null; ) { + if (o = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !o) continue; - if (l = [...o].length, r[3] || r[4]) { + if (l = [...o].length, i[3] || i[4]) { u += l; continue; - } else if ((r[5] || r[6]) && a % 3 && !((a + l) % 3)) { + } else if ((i[5] || i[6]) && a % 3 && !((a + l) % 3)) { c += l; continue; } if (u -= l, u > 0) continue; l = Math.min(l, l + u + c); - const d = [...r[0]][0].length, f = e.slice(0, a + r.index + d + l); + const d = [...i[0]][0].length, f = e.slice(0, a + i.index + d + l); if (Math.min(a, l) % 2) { const g = f.slice(1, -1); return { @@ -10652,8 +10652,8 @@ class El { const t = this.rules.inline.code.exec(e); if (t) { let n = t[2].replace(/\n/g, " "); - const r = /[^ ]/.test(n), s = /^ /.test(n) && / $/.test(n); - return r && s && (n = n.substring(1, n.length - 1)), n = Ln(n, !0), { + const i = /[^ ]/.test(n), s = /^ /.test(n) && / $/.test(n); + return i && s && (n = n.substring(1, n.length - 1)), n = Ln(n, !0), { type: "codespan", raw: t[0], text: n @@ -10681,12 +10681,12 @@ class El { autolink(e) { const t = this.rules.inline.autolink.exec(e); if (t) { - let n, r; - return t[2] === "@" ? (n = Ln(t[1]), r = "mailto:" + n) : (n = Ln(t[1]), r = n), { + let n, i; + return t[2] === "@" ? (n = Ln(t[1]), i = "mailto:" + n) : (n = Ln(t[1]), i = n), { type: "link", raw: t[0], text: n, - href: r, + href: i, tokens: [ { type: "text", @@ -10701,26 +10701,26 @@ class El { var n; let t; if (t = this.rules.inline.url.exec(e)) { - let r, s; + let i, s; if (t[2] === "@") - r = Ln(t[0]), s = "mailto:" + r; + i = Ln(t[0]), s = "mailto:" + i; else { let a; do a = t[0], t[0] = ((n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) ?? ""; while (a !== t[0]); - r = Ln(t[0]), t[1] === "www." ? s = "http://" + t[0] : s = t[0]; + i = Ln(t[0]), t[1] === "www." ? s = "http://" + t[0] : s = t[0]; } return { type: "link", raw: t[0], - text: r, + text: i, href: s, tokens: [ { type: "text", - raw: r, - text: r + raw: i, + text: i } ] }; @@ -10766,10 +10766,10 @@ const U3 = /^(?: *(?:\n|$))+/, H3 = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, G3 = lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Ze(kh).replace("hr", eo).replace("heading", ` *#{1,6} *[^ ]`).replace("lheading", c_).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() -}, d_ = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Q3 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, f_ = /^( {2,}|\\)\n(?!\s*$)/, Z3 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, tb = Ze(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, to).getRegex(), nb = Ze("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, to).getRegex(), ib = Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, to).getRegex(), rb = Ze(/\\([punct])/, "gu").replace(/punct/g, to).getRegex(), sb = Ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ab = Ze(Lh).replace("(?:-->|$)", "-->").getRegex(), ob = Ze("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", ab).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Sl = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, lb = Ze(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Sl).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), m_ = Ze(/^!?\[(label)\]\[(ref)\]/).replace("label", Sl).replace("ref", Ih).getRegex(), g_ = Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ih).getRegex(), ub = Ze("reflink|nolink(?!\\()", "g").replace("reflink", m_).replace("nolink", g_).getRegex(), Ch = { +}, d_ = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Q3 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, f_ = /^( {2,}|\\)\n(?!\s*$)/, Z3 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, tb = Ze(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, to).getRegex(), nb = Ze("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, to).getRegex(), rb = Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, to).getRegex(), ib = Ze(/\\([punct])/, "gu").replace(/punct/g, to).getRegex(), sb = Ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ab = Ze(Lh).replace("(?:-->|$)", "-->").getRegex(), ob = Ze("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", ab).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Sl = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, lb = Ze(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Sl).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), m_ = Ze(/^!?\[(label)\]\[(ref)\]/).replace("label", Sl).replace("ref", Ih).getRegex(), g_ = Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ih).getRegex(), ub = Ze("reflink|nolink(?!\\()", "g").replace("reflink", m_).replace("nolink", g_).getRegex(), Ch = { _backpedal: Da, // only used for GFM url - anyPunctuation: rb, + anyPunctuation: ib, autolink: sb, blockSkip: eb, br: f_, @@ -10777,7 +10777,7 @@ const U3 = /^(?: *(?:\n|$))+/, H3 = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, G3 = del: Da, emStrongLDelim: tb, emStrongRDelimAst: nb, - emStrongRDelimUnd: ib, + emStrongRDelimUnd: rb, escape: d_, link: lb, nolink: g_, @@ -10812,13 +10812,13 @@ const U3 = /^(?: *(?:\n|$))+/, H3 = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, G3 = breaks: hb, pedantic: cb }; -class Ri { +class Rr { constructor(e) { - it(this, "tokens"); - it(this, "options"); - it(this, "state"); - it(this, "tokenizer"); - it(this, "inlineQueue"); + rt(this, "tokens"); + rt(this, "options"); + rt(this, "state"); + rt(this, "tokenizer"); + rt(this, "inlineQueue"); this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ms, this.options.tokenizer = this.options.tokenizer || new El(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, @@ -10843,13 +10843,13 @@ class Ri { * Static Lex Method */ static lex(e, t) { - return new Ri(t).lex(e); + return new Rr(t).lex(e); } /** * Static Lex Inline Method */ static lexInline(e, t) { - return new Ri(t).inlineTokens(e); + return new Rr(t).inlineTokens(e); } /** * Preprocessing @@ -10865,7 +10865,7 @@ class Ri { } blockTokens(e, t = []) { this.options.pedantic ? e = e.replace(/\t/g, " ").replace(/^ +$/gm, "") : e = e.replace(/^( *)(\t+)/gm, (o, l, u) => l + " ".repeat(u.length)); - let n, r, s, a; + let n, i, s, a; for (; e; ) if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((o) => (n = o.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) { if (n = this.tokenizer.space(e)) { @@ -10874,9 +10874,9 @@ class Ri { continue; } if (n = this.tokenizer.code(e)) { - e = e.substring(n.raw.length), r = t[t.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += ` -` + n.raw, r.text += ` -` + n.text, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : t.push(n); + e = e.substring(n.raw.length), i = t[t.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += ` +` + n.raw, i.text += ` +` + n.text, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n); continue; } if (n = this.tokenizer.fences(e)) { @@ -10904,9 +10904,9 @@ class Ri { continue; } if (n = this.tokenizer.def(e)) { - e = e.substring(n.raw.length), r = t[t.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += ` -` + n.raw, r.text += ` -` + n.raw, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : this.tokens.links[n.tag] || (this.tokens.links[n.tag] = { + e = e.substring(n.raw.length), i = t[t.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += ` +` + n.raw, i.text += ` +` + n.raw, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : this.tokens.links[n.tag] || (this.tokens.links[n.tag] = { href: n.href, title: n.title }); @@ -10929,15 +10929,15 @@ class Ri { }), o < 1 / 0 && o >= 0 && (s = e.substring(0, o + 1)); } if (this.state.top && (n = this.tokenizer.paragraph(s))) { - r = t[t.length - 1], a && r.type === "paragraph" ? (r.raw += ` -` + n.raw, r.text += ` -` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : t.push(n), a = s.length !== e.length, e = e.substring(n.raw.length); + i = t[t.length - 1], a && i.type === "paragraph" ? (i.raw += ` +` + n.raw, i.text += ` +` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n), a = s.length !== e.length, e = e.substring(n.raw.length); continue; } if (n = this.tokenizer.text(e)) { - e = e.substring(n.raw.length), r = t[t.length - 1], r && r.type === "text" ? (r.raw += ` -` + n.raw, r.text += ` -` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : t.push(n); + e = e.substring(n.raw.length), i = t[t.length - 1], i && i.type === "text" ? (i.raw += ` +` + n.raw, i.text += ` +` + n.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n); continue; } if (e) { @@ -10958,7 +10958,7 @@ class Ri { * Lexing/Compiling */ inlineTokens(e, t = []) { - let n, r, s, a = e, o, l, u; + let n, i, s, a = e, o, l, u; if (this.tokens.links) { const c = Object.keys(this.tokens.links); if (c.length > 0) @@ -10976,7 +10976,7 @@ class Ri { continue; } if (n = this.tokenizer.tag(e)) { - e = e.substring(n.raw.length), r = t[t.length - 1], r && n.type === "text" && r.type === "text" ? (r.raw += n.raw, r.text += n.text) : t.push(n); + e = e.substring(n.raw.length), i = t[t.length - 1], i && n.type === "text" && i.type === "text" ? (i.raw += n.raw, i.text += n.text) : t.push(n); continue; } if (n = this.tokenizer.link(e)) { @@ -10984,7 +10984,7 @@ class Ri { continue; } if (n = this.tokenizer.reflink(e, this.tokens.links)) { - e = e.substring(n.raw.length), r = t[t.length - 1], r && n.type === "text" && r.type === "text" ? (r.raw += n.raw, r.text += n.text) : t.push(n); + e = e.substring(n.raw.length), i = t[t.length - 1], i && n.type === "text" && i.type === "text" ? (i.raw += n.raw, i.text += n.text) : t.push(n); continue; } if (n = this.tokenizer.emStrong(e, a, u)) { @@ -11020,7 +11020,7 @@ class Ri { }), c < 1 / 0 && c >= 0 && (s = e.substring(0, c + 1)); } if (n = this.tokenizer.inlineText(s)) { - e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (u = n.raw.slice(-1)), l = !0, r = t[t.length - 1], r && r.type === "text" ? (r.raw += n.raw, r.text += n.text) : t.push(n); + e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (u = n.raw.slice(-1)), l = !0, i = t[t.length - 1], i && i.type === "text" ? (i.raw += n.raw, i.text += n.text) : t.push(n); continue; } if (e) { @@ -11037,14 +11037,14 @@ class Ri { } class Tl { constructor(e) { - it(this, "options"); + rt(this, "options"); this.options = e || ms; } code(e, t, n) { var s; - const r = (s = (t || "").match(/^\S*/)) == null ? void 0 : s[0]; + const i = (s = (t || "").match(/^\S*/)) == null ? void 0 : s[0]; return e = e.replace(/\n$/, "") + ` -`, r ? '
' + (n ? e : Ln(e, !0)) + `
+`, i ? '
' + (n ? e : Ln(e, !0)) + `
` : "
" + (n ? e : Ln(e, !0)) + `
`; } @@ -11065,9 +11065,9 @@ ${e} `; } list(e, t, n) { - const r = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : ""; - return "<" + r + s + `> -` + e + " + const i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : ""; + return "<" + i + s + `> +` + e + " `; } listitem(e, t, n) { @@ -11117,18 +11117,18 @@ ${e} return `${e}`; } link(e, t, n) { - const r = ff(e); - if (r === null) + const i = ff(e); + if (i === null) return n; - e = r; + e = i; let s = '", s; } image(e, t, n) { - const r = ff(e); - if (r === null) + const i = ff(e); + if (i === null) return n; - e = r; + e = i; let s = `${n} { + (s = (i = this.defaults.extensions) == null ? void 0 : i.childTokens) != null && s[o.type] ? this.defaults.extensions.childTokens[o.type].forEach((l) => { const u = o[l].flat(1 / 0); n = n.concat(this.walkTokens(u, t)); }) : o.tokens && (n = n.concat(this.walkTokens(o.tokens, t))); @@ -11440,8 +11440,8 @@ class db { use(...e) { const t = this.defaults.extensions || { renderers: {}, childTokens: {} }; return e.forEach((n) => { - const r = { ...n }; - if (r.async = this.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((s) => { + const i = { ...n }; + if (i.async = this.defaults.async || i.async || !1, n.extensions && (n.extensions.forEach((s) => { if (!s.name) throw new Error("extension name required"); if ("renderer" in s) { @@ -11458,7 +11458,7 @@ class db { a ? a.unshift(s.tokenizer) : t[s.level] = [s.tokenizer], s.start && (s.level === "block" ? t.startBlock ? t.startBlock.push(s.start) : t.startBlock = [s.start] : s.level === "inline" && (t.startInline ? t.startInline.push(s.start) : t.startInline = [s.start])); } "childTokens" in s && s.childTokens && (t.childTokens[s.name] = s.childTokens); - }), r.extensions = t), n.renderer) { + }), i.extensions = t), n.renderer) { const s = this.defaults.renderer || new Tl(this.defaults); for (const a in n.renderer) { if (!(a in s)) @@ -11471,7 +11471,7 @@ class db { return h === !1 && (h = u.apply(s, c)), h || ""; }; } - r.renderer = s; + i.renderer = s; } if (n.tokenizer) { const s = this.defaults.tokenizer || new El(this.defaults); @@ -11486,7 +11486,7 @@ class db { return h === !1 && (h = u.apply(s, c)), h; }; } - r.tokenizer = s; + i.tokenizer = s; } if (n.hooks) { const s = this.defaults.hooks || new ka(); @@ -11506,31 +11506,31 @@ class db { return h === !1 && (h = u.apply(s, c)), h; }; } - r.hooks = s; + i.hooks = s; } if (n.walkTokens) { const s = this.defaults.walkTokens, a = n.walkTokens; - r.walkTokens = function(o) { + i.walkTokens = function(o) { let l = []; return l.push(a.call(this, o)), s && (l = l.concat(s.call(this, o))), l; }; } - this.defaults = { ...this.defaults, ...r }; + this.defaults = { ...this.defaults, ...i }; }), this; } setOptions(e) { return this.defaults = { ...this.defaults, ...e }, this; } lexer(e, t) { - return Ri.lex(e, t ?? this.defaults); + return Rr.lex(e, t ?? this.defaults); } parser(e, t) { - return Ci.parse(e, t ?? this.defaults); + return Cr.parse(e, t ?? this.defaults); } } ds = new WeakSet(), pc = function(e, t) { - return (n, r) => { - const s = { ...r }, a = { ...this.defaults, ...s }; + return (n, i) => { + const s = { ...i }, a = { ...this.defaults, ...s }; this.defaults.async === !0 && s.async === !1 && (a.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), a.async = !0); const o = mo(this, ds, p_).call(this, !!a.silent, !!a.async); if (typeof n > "u" || n === null) @@ -11553,36 +11553,36 @@ ds = new WeakSet(), pc = function(e, t) { return (n) => { if (n.message += ` Please report this to https://github.com/markedjs/marked.`, e) { - const r = "

An error occurred:

" + Ln(n.message + "", !0) + "
"; - return t ? Promise.resolve(r) : r; + const i = "

An error occurred:

" + Ln(n.message + "", !0) + "
"; + return t ? Promise.resolve(i) : i; } if (t) return Promise.reject(n); throw n; }; }; -const is = new db(); -function Xe(i, e) { - return is.parse(i, e); +const rs = new db(); +function Xe(r, e) { + return rs.parse(r, e); } -Xe.options = Xe.setOptions = function(i) { - return is.setOptions(i), Xe.defaults = is.defaults, a_(Xe.defaults), Xe; +Xe.options = Xe.setOptions = function(r) { + return rs.setOptions(r), Xe.defaults = rs.defaults, a_(Xe.defaults), Xe; }; Xe.getDefaults = Dh; Xe.defaults = ms; -Xe.use = function(...i) { - return is.use(...i), Xe.defaults = is.defaults, a_(Xe.defaults), Xe; +Xe.use = function(...r) { + return rs.use(...r), Xe.defaults = rs.defaults, a_(Xe.defaults), Xe; }; -Xe.walkTokens = function(i, e) { - return is.walkTokens(i, e); +Xe.walkTokens = function(r, e) { + return rs.walkTokens(r, e); }; -Xe.parseInline = is.parseInline; -Xe.Parser = Ci; -Xe.parser = Ci.parse; +Xe.parseInline = rs.parseInline; +Xe.Parser = Cr; +Xe.parser = Cr.parse; Xe.Renderer = Tl; Xe.TextRenderer = Fh; -Xe.Lexer = Ri; -Xe.lexer = Ri.lex; +Xe.Lexer = Rr; +Xe.lexer = Rr.lex; Xe.Tokenizer = El; Xe.Hooks = ka; Xe.parse = Xe; @@ -11591,8 +11591,8 @@ Xe.setOptions; Xe.use; Xe.walkTokens; Xe.parseInline; -Ci.parse; -Ri.lex; +Cr.parse; +Rr.lex; const fb = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, mb = Object.hasOwnProperty; class __ { /** @@ -11617,11 +11617,11 @@ class __ { */ slug(e, t) { const n = this; - let r = gb(e, t === !0); - const s = r; - for (; mb.call(n.occurrences, r); ) - n.occurrences[s]++, r = s + "-" + n.occurrences[s]; - return n.occurrences[r] = 0, r; + let i = gb(e, t === !0); + const s = i; + for (; mb.call(n.occurrences, i); ) + n.occurrences[s]++, i = s + "-" + n.occurrences[s]; + return n.occurrences[i] = 0, i; } /** * Reset - Forget all previous slugs @@ -11632,12 +11632,12 @@ class __ { this.occurrences = /* @__PURE__ */ Object.create(null); } } -function gb(i, e) { - return typeof i != "string" ? "" : (e || (i = i.toLowerCase()), i.replace(fb, "").replace(/ /g, "-")); +function gb(r, e) { + return typeof r != "string" ? "" : (e || (r = r.toLowerCase()), r.replace(fb, "").replace(/ /g, "-")); } new __(); var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, pb = { exports: {} }; -(function(i) { +(function(r) { var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {}; /** * Prism: Lightweight, robust, elegant syntax highlighting @@ -11648,7 +11648,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @public */ var t = function(n) { - var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, s = 0, a = {}, o = { + var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, s = 0, a = {}, o = { /** * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load @@ -11780,7 +11780,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t */ getLanguage: function(y) { for (; y; ) { - var v = r.exec(y.className); + var v = i.exec(y.className); if (v) return v[1].toLowerCase(); y = y.parentElement; @@ -11795,7 +11795,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @returns {void} */ setLanguage: function(y, v) { - y.className = y.className.replace(RegExp(r, "gi"), ""), y.classList.add("language-" + v); + y.className = y.className.replace(RegExp(i, "gi"), ""), y.classList.add("language-" + v); }, /** * Returns the script element that is currently executing. @@ -12335,7 +12335,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t } return o; }(e); - i.exports && (i.exports = t), typeof _f < "u" && (_f.Prism = t), t.languages.markup = { + r.exports && (r.exports = t), typeof _f < "u" && (_f.Prism = t), t.languages.markup = { comment: { pattern: //, greedy: !0 @@ -12426,7 +12426,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @example * addInlined('style', 'css'); */ - value: function(r, s) { + value: function(i, s) { var a = {}; a["language-" + s] = { pattern: /(^$)/i, @@ -12444,9 +12444,9 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t inside: t.languages[s] }; var l = {}; - l[r] = { + l[i] = { pattern: RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g, function() { - return r; + return i; }), "i"), lookbehind: !0, greedy: !0, @@ -12465,7 +12465,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @example * addAttribute('style', 'css'); */ - value: function(n, r) { + value: function(n, i) { t.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp( /(^|["'\s])/.source + "(?:" + n + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, @@ -12480,8 +12480,8 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, - alias: [r, "language-" + r], - inside: t.languages[r] + alias: [i, "language-" + i], + inside: t.languages[i] }, punctuation: [ { @@ -12496,11 +12496,11 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t }); } }), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, function(n) { - var r = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; + var i = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; n.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { - pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + r.source + ")*?" + /(?:;|(?=\s*\{))/.source), + pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + i.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { @@ -12517,23 +12517,23 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t }, url: { // https://drafts.csswg.org/css-values-3/#urls - pattern: RegExp("\\burl\\((?:" + r.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), + pattern: RegExp("\\burl\\((?:" + i.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { - pattern: RegExp("^" + r.source + "$"), + pattern: RegExp("^" + i.source + "$"), alias: "url" } } }, selector: { - pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + r.source + ")*(?=\\s*\\{)"), + pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + i.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { - pattern: r, + pattern: i, greedy: !0 }, property: { @@ -12713,7 +12713,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t if (typeof t > "u" || typeof document > "u") return; Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector); - var n = "Loading…", r = function(g, p) { + var n = "Loading…", i = function(g, p) { return "✖ Error " + g + " while fetching file: " + p; }, s = "✖ Error: File does not exist or is empty", a = { js: "javascript", @@ -12729,7 +12729,7 @@ var _f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t function d(g, p, b) { var y = new XMLHttpRequest(); y.open("GET", g, !0), y.onreadystatechange = function() { - y.readyState == 4 && (y.status < 400 && y.responseText ? p(y.responseText) : y.status >= 400 ? b(r(y.status, y.statusText)) : b(s)); + y.readyState == 4 && (y.status < 400 && y.responseText ? p(y.responseText) : y.status >= 400 ? b(i(y.status, y.statusText)) : b(s)); }, y.send(null); } function f(g) { @@ -12856,14 +12856,14 @@ Prism.languages.python = { }; Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python; Prism.languages.py = Prism.languages.python; -(function(i) { +(function(r) { var e = /\\(?:[^a-z()[\]]|[a-z*]+)/i, t = { "equation-command": { pattern: e, alias: "regex" } }; - i.languages.latex = { + r.languages.latex = { comment: /%.*/, // the verbatim environment prints whitespace to the document cdata: { @@ -12913,9 +12913,9 @@ Prism.languages.py = Prism.languages.python; alias: "selector" }, punctuation: /[[\]{}&]/ - }, i.languages.tex = i.languages.latex, i.languages.context = i.languages.latex; + }, r.languages.tex = r.languages.latex, r.languages.context = r.languages.latex; })(Prism); -(function(i) { +(function(r) { var e = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", t = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, @@ -12977,7 +12977,7 @@ Prism.languages.py = Prism.languages.python; // Escape sequences from echo and printf's manuals, and escaped quotes. entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ }; - i.languages.bash = { + r.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" @@ -13113,8 +13113,8 @@ Prism.languages.py = Prism.languages.python; pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } - }, t.inside = i.languages.bash; - for (var r = [ + }, t.inside = r.languages.bash; + for (var i = [ "comment", "function-name", "for-or-select", @@ -13130,17 +13130,17 @@ Prism.languages.py = Prism.languages.python; "operator", "punctuation", "number" - ], s = n.variable[1].inside, a = 0; a < r.length; a++) - s[r[a]] = i.languages.bash[r[a]]; - i.languages.sh = i.languages.bash, i.languages.shell = i.languages.bash; + ], s = n.variable[1].inside, a = 0; a < i.length; a++) + s[i[a]] = r.languages.bash[i[a]]; + r.languages.sh = r.languages.bash, r.languages.shell = r.languages.bash; })(Prism); new __(); -const _b = (i) => { +const _b = (r) => { const e = {}; - for (let t = 0, n = i.length; t < n; t++) { - const r = i[t]; - for (const s in r) - e[s] ? e[s] = e[s].concat(r[s]) : e[s] = r[s]; + for (let t = 0, n = r.length; t < n; t++) { + const i = r[t]; + for (const s in i) + e[s] ? e[s] = e[s].concat(i[s]) : e[s] = i[s]; } return e; }, vb = [ @@ -13592,9 +13592,9 @@ const _b = (i) => { "xmlns" ]; _b([ - Object.fromEntries(vb.map((i) => [i, ["*"]])), - Object.fromEntries(yb.map((i) => [i, ["svg:*"]])), - Object.fromEntries(bb.map((i) => [i, ["math:*"]])) + Object.fromEntries(vb.map((r) => [r, ["*"]])), + Object.fromEntries(yb.map((r) => [r, ["svg:*"]])), + Object.fromEntries(bb.map((r) => [r, ["math:*"]])) ]); const { HtmlTagHydration: GI, @@ -13611,7 +13611,7 @@ const { noop: JI, safe_not_equal: eL, toggle_class: tL -} = window.__gradio__svelte__internal, { afterUpdate: nL, tick: iL, onMount: rL } = window.__gradio__svelte__internal, { +} = window.__gradio__svelte__internal, { afterUpdate: nL, tick: rL, onMount: iL } = window.__gradio__svelte__internal, { SvelteComponent: sL, attr: aL, children: oL, @@ -13673,18 +13673,18 @@ const { set_data: Rb, space: Cb, text: Fb, - toggle_class: fr, + toggle_class: fi, transition_in: Pb, transition_out: Mb } = window.__gradio__svelte__internal; -function Ob(i) { - let e, t, n, r, s, a, o; +function Ob(r) { + let e, t, n, i, s, a, o; return n = new /*Icon*/ - i[1]({}), { + r[1]({}), { c() { - e = bf("label"), t = bf("span"), xb(n.$$.fragment), r = Cb(), s = Fb( + e = bf("label"), t = bf("span"), xb(n.$$.fragment), i = Cb(), s = Fb( /*label*/ - i[0] + r[0] ), this.h(); }, l(l) { @@ -13697,30 +13697,30 @@ function Ob(i) { var u = vf(e); t = yf(u, "SPAN", { class: !0 }); var c = vf(t); - Sb(n.$$.fragment, c), c.forEach(W0), r = Tb(u), s = Ab( + Sb(n.$$.fragment, c), c.forEach(W0), i = Tb(u), s = Ab( u, /*label*/ - i[0] + r[0] ), u.forEach(W0), this.h(); }, h() { Es(t, "class", "svelte-13ao5pu"), Es(e, "for", ""), Es(e, "data-testid", "block-label"), Es(e, "dir", a = /*rtl*/ - i[5] ? "rtl" : "ltr"), Es(e, "class", "svelte-13ao5pu"), fr(e, "hide", !/*show_label*/ - i[2]), fr(e, "sr-only", !/*show_label*/ - i[2]), fr( + r[5] ? "rtl" : "ltr"), Es(e, "class", "svelte-13ao5pu"), fi(e, "hide", !/*show_label*/ + r[2]), fi(e, "sr-only", !/*show_label*/ + r[2]), fi( e, "float", /*float*/ - i[4] - ), fr( + r[4] + ), fi( e, "hide-label", /*disable*/ - i[3] + r[3] ); }, m(l, u) { - kb(l, e, u), j0(e, t), Ib(n, t, null), j0(e, r), j0(e, s), o = !0; + kb(l, e, u), j0(e, t), Ib(n, t, null), j0(e, i), j0(e, s), o = !0; }, p(l, [u]) { (!o || u & /*label*/ @@ -13731,17 +13731,17 @@ function Ob(i) { ), (!o || u & /*rtl*/ 32 && a !== (a = /*rtl*/ l[5] ? "rtl" : "ltr")) && Es(e, "dir", a), (!o || u & /*show_label*/ - 4) && fr(e, "hide", !/*show_label*/ + 4) && fi(e, "hide", !/*show_label*/ l[2]), (!o || u & /*show_label*/ - 4) && fr(e, "sr-only", !/*show_label*/ + 4) && fi(e, "sr-only", !/*show_label*/ l[2]), (!o || u & /*float*/ - 16) && fr( + 16) && fi( e, "float", /*float*/ l[4] ), (!o || u & /*disable*/ - 8) && fr( + 8) && fi( e, "hide-label", /*disable*/ @@ -13759,11 +13759,11 @@ function Ob(i) { } }; } -function Bb(i, e, t) { - let { label: n = null } = e, { Icon: r } = e, { show_label: s = !0 } = e, { disable: a = !1 } = e, { float: o = !0 } = e, { rtl: l = !1 } = e; - return i.$$set = (u) => { - "label" in u && t(0, n = u.label), "Icon" in u && t(1, r = u.Icon), "show_label" in u && t(2, s = u.show_label), "disable" in u && t(3, a = u.disable), "float" in u && t(4, o = u.float), "rtl" in u && t(5, l = u.rtl); - }, [n, r, s, a, o, l]; +function Bb(r, e, t) { + let { label: n = null } = e, { Icon: i } = e, { show_label: s = !0 } = e, { disable: a = !1 } = e, { float: o = !0 } = e, { rtl: l = !1 } = e; + return r.$$set = (u) => { + "label" in u && t(0, n = u.label), "Icon" in u && t(1, i = u.Icon), "show_label" in u && t(2, s = u.show_label), "disable" in u && t(3, a = u.disable), "float" in u && t(4, o = u.float), "rtl" in u && t(5, l = u.rtl); + }, [n, i, s, a, o, l]; } class v_ extends Eb { constructor(e) { @@ -13779,8 +13779,8 @@ class v_ extends Eb { } const { SvelteComponent: Nb, - append_hydration: il, - attr: Zi, + append_hydration: rl, + attr: Zr, bubble: $b, check_outros: Ub, children: _c, @@ -13811,32 +13811,32 @@ const { transition_out: X0, update_slot_base: Zb } = window.__gradio__svelte__internal; -function Df(i) { +function Df(r) { let e, t; return { c() { e = yc("span"), t = Qb( /*label*/ - i[1] + r[1] ), this.h(); }, l(n) { e = vc(n, "SPAN", { class: !0 }); - var r = _c(e); + var i = _c(e); t = Gb( - r, + i, /*label*/ - i[1] - ), r.forEach(Ia), this.h(); + r[1] + ), i.forEach(Ia), this.h(); }, h() { - Zi(e, "class", "svelte-qgco6m"); + Zr(e, "class", "svelte-qgco6m"); }, - m(n, r) { - y_(n, e, r), il(e, t); + m(n, i) { + y_(n, e, i), rl(e, t); }, - p(n, r) { - r & /*label*/ + p(n, i) { + i & /*label*/ 2 && Xb( t, /*label*/ @@ -13848,32 +13848,32 @@ function Df(i) { } }; } -function Jb(i) { - let e, t, n, r, s, a, o, l, u = ( +function Jb(r) { + let e, t, n, i, s, a, o, l, u = ( /*show_label*/ - i[2] && Df(i) + r[2] && Df(r) ); var c = ( /*Icon*/ - i[0] + r[0] ); function h(m, g) { return {}; } - c && (r = Sf(c, h())); + c && (i = Sf(c, h())); const d = ( /*#slots*/ - i[14].default + r[14].default ), f = zb( d, - i, + r, /*$$scope*/ - i[13], + r[13], null ); return { c() { - e = yc("button"), u && u.c(), t = wf(), n = yc("div"), r && Tf(r.$$.fragment), s = wf(), f && f.c(), this.h(); + e = yc("button"), u && u.c(), t = wf(), n = yc("div"), i && Tf(i.$$.fragment), s = wf(), f && f.c(), this.h(); }, l(m) { e = vc(m, "BUTTON", { @@ -13885,82 +13885,82 @@ function Jb(i) { var g = _c(e); u && u.l(g), t = Ef(g), n = vc(g, "DIV", { class: !0 }); var p = _c(n); - r && Hb(r.$$.fragment, p), s = Ef(p), f && f.l(p), p.forEach(Ia), g.forEach(Ia), this.h(); + i && Hb(i.$$.fragment, p), s = Ef(p), f && f.l(p), p.forEach(Ia), g.forEach(Ia), this.h(); }, h() { - Zi(n, "class", "svelte-qgco6m"), tn( + Zr(n, "class", "svelte-qgco6m"), tn( n, "x-small", /*size*/ - i[4] === "x-small" + r[4] === "x-small" ), tn( n, "small", /*size*/ - i[4] === "small" + r[4] === "small" ), tn( n, "large", /*size*/ - i[4] === "large" + r[4] === "large" ), tn( n, "medium", /*size*/ - i[4] === "medium" + r[4] === "medium" ), e.disabled = /*disabled*/ - i[7], Zi( + r[7], Zr( e, "aria-label", /*label*/ - i[1] - ), Zi( + r[1] + ), Zr( e, "aria-haspopup", /*hasPopup*/ - i[8] - ), Zi( + r[8] + ), Zr( e, "title", /*label*/ - i[1] - ), Zi(e, "class", "svelte-qgco6m"), tn( + r[1] + ), Zr(e, "class", "svelte-qgco6m"), tn( e, "pending", /*pending*/ - i[3] + r[3] ), tn( e, "padded", /*padded*/ - i[5] + r[5] ), tn( e, "highlight", /*highlight*/ - i[6] + r[6] ), tn( e, "transparent", /*transparent*/ - i[9] + r[9] ), To(e, "color", !/*disabled*/ - i[7] && /*_color*/ - i[11] ? ( + r[7] && /*_color*/ + r[11] ? ( /*_color*/ - i[11] + r[11] ) : "var(--block-label-text-color)"), To(e, "--bg-color", /*disabled*/ - i[7] ? "auto" : ( + r[7] ? "auto" : ( /*background*/ - i[10] + r[10] )); }, m(m, g) { - y_(m, e, g), u && u.m(e, null), il(e, t), il(e, n), r && xf(r, n, null), il(n, s), f && f.m(n, null), a = !0, o || (l = Wb( + y_(m, e, g), u && u.m(e, null), rl(e, t), rl(e, n), i && xf(i, n, null), rl(n, s), f && f.m(n, null), a = !0, o || (l = Wb( e, "click", /*click_handler*/ - i[15] + r[15] ), o = !0); }, p(m, [g]) { @@ -13968,14 +13968,14 @@ function Jb(i) { m[2] ? u ? u.p(m, g) : (u = Df(m), u.c(), u.m(e, t)) : u && (u.d(1), u = null), g & /*Icon*/ 1 && c !== (c = /*Icon*/ m[0])) { - if (r) { + if (i) { Kb(); - const p = r; + const p = i; X0(p.$$.fragment, 1, 0, () => { Af(p, 1); }), Ub(); } - c ? (r = Sf(c, h()), Tf(r.$$.fragment), Y0(r.$$.fragment, 1), xf(r, n, s)) : r = null; + c ? (i = Sf(c, h()), Tf(i.$$.fragment), Y0(i.$$.fragment, 1), xf(i, n, s)) : i = null; } f && f.p && (!a || g & /*$$scope*/ 8192) && Zb( @@ -14022,19 +14022,19 @@ function Jb(i) { ), (!a || g & /*disabled*/ 128) && (e.disabled = /*disabled*/ m[7]), (!a || g & /*label*/ - 2) && Zi( + 2) && Zr( e, "aria-label", /*label*/ m[1] ), (!a || g & /*hasPopup*/ - 256) && Zi( + 256) && Zr( e, "aria-haspopup", /*hasPopup*/ m[8] ), (!a || g & /*label*/ - 2) && Zi( + 2) && Zr( e, "title", /*label*/ @@ -14077,25 +14077,25 @@ function Jb(i) { )); }, i(m) { - a || (r && Y0(r.$$.fragment, m), Y0(f, m), a = !0); + a || (i && Y0(i.$$.fragment, m), Y0(f, m), a = !0); }, o(m) { - r && X0(r.$$.fragment, m), X0(f, m), a = !1; + i && X0(i.$$.fragment, m), X0(f, m), a = !1; }, d(m) { - m && Ia(e), u && u.d(), r && Af(r), f && f.d(m), o = !1, l(); + m && Ia(e), u && u.d(), i && Af(i), f && f.d(m), o = !1, l(); } }; } -function e5(i, e, t) { - let n, { $$slots: r = {}, $$scope: s } = e, { Icon: a } = e, { label: o = "" } = e, { show_label: l = !1 } = e, { pending: u = !1 } = e, { size: c = "small" } = e, { padded: h = !0 } = e, { highlight: d = !1 } = e, { disabled: f = !1 } = e, { hasPopup: m = !1 } = e, { color: g = "var(--block-label-text-color)" } = e, { transparent: p = !1 } = e, { background: b = "var(--block-background-fill)" } = e; +function e5(r, e, t) { + let n, { $$slots: i = {}, $$scope: s } = e, { Icon: a } = e, { label: o = "" } = e, { show_label: l = !1 } = e, { pending: u = !1 } = e, { size: c = "small" } = e, { padded: h = !0 } = e, { highlight: d = !1 } = e, { disabled: f = !1 } = e, { hasPopup: m = !1 } = e, { color: g = "var(--block-label-text-color)" } = e, { transparent: p = !1 } = e, { background: b = "var(--block-background-fill)" } = e; function y(v) { - $b.call(this, i, v); + $b.call(this, r, v); } - return i.$$set = (v) => { + return r.$$set = (v) => { "Icon" in v && t(0, a = v.Icon), "label" in v && t(1, o = v.label), "show_label" in v && t(2, l = v.show_label), "pending" in v && t(3, u = v.pending), "size" in v && t(4, c = v.size), "padded" in v && t(5, h = v.padded), "highlight" in v && t(6, d = v.highlight), "disabled" in v && t(7, f = v.disabled), "hasPopup" in v && t(8, m = v.hasPopup), "color" in v && t(12, g = v.color), "transparent" in v && t(9, p = v.transparent), "background" in v && t(10, b = v.background), "$$scope" in v && t(13, s = v.$$scope); - }, i.$$.update = () => { - i.$$.dirty & /*highlight, color*/ + }, r.$$.update = () => { + r.$$.dirty & /*highlight, color*/ 4160 && t(11, n = d ? "var(--color-accent)" : g); }, [ a, @@ -14112,11 +14112,11 @@ function e5(i, e, t) { n, g, s, - r, + i, y ]; } -class Pr extends Nb { +class Pi extends Nb { constructor(e) { super(), jb(this, e, e5, Jb, Yb, { Icon: 0, @@ -14138,10 +14138,10 @@ const { SvelteComponent: t5, append_hydration: n5, attr: Q0, - binding_callbacks: i5, + binding_callbacks: r5, children: kf, claim_element: If, - create_slot: r5, + create_slot: i5, detach: Z0, element: Lf, get_all_dirty_from_scope: s5, @@ -14149,21 +14149,21 @@ const { init: o5, insert_hydration: l5, safe_not_equal: u5, - toggle_class: mr, + toggle_class: mi, transition_in: c5, transition_out: h5, update_slot_base: d5 } = window.__gradio__svelte__internal; -function f5(i) { +function f5(r) { let e, t, n; - const r = ( + const i = ( /*#slots*/ - i[5].default - ), s = r5( - r, + r[5].default + ), s = i5( i, + r, /*$$scope*/ - i[4], + r[4], null ); return { @@ -14178,41 +14178,41 @@ function f5(i) { s && s.l(l), l.forEach(Z0), o.forEach(Z0), this.h(); }, h() { - Q0(t, "class", "icon svelte-3w3rth"), Q0(e, "class", "empty svelte-3w3rth"), Q0(e, "aria-label", "Empty value"), mr( + Q0(t, "class", "icon svelte-3w3rth"), Q0(e, "class", "empty svelte-3w3rth"), Q0(e, "aria-label", "Empty value"), mi( e, "small", /*size*/ - i[0] === "small" - ), mr( + r[0] === "small" + ), mi( e, "large", /*size*/ - i[0] === "large" - ), mr( + r[0] === "large" + ), mi( e, "unpadded_box", /*unpadded_box*/ - i[1] - ), mr( + r[1] + ), mi( e, "small_parent", /*parent_height*/ - i[3] + r[3] ); }, m(a, o) { - l5(a, e, o), n5(e, t), s && s.m(t, null), i[6](e), n = !0; + l5(a, e, o), n5(e, t), s && s.m(t, null), r[6](e), n = !0; }, p(a, [o]) { s && s.p && (!n || o & /*$$scope*/ 16) && d5( s, - r, + i, a, /*$$scope*/ a[4], n ? a5( - r, + i, /*$$scope*/ a[4], o, @@ -14223,25 +14223,25 @@ function f5(i) { ), null ), (!n || o & /*size*/ - 1) && mr( + 1) && mi( e, "small", /*size*/ a[0] === "small" ), (!n || o & /*size*/ - 1) && mr( + 1) && mi( e, "large", /*size*/ a[0] === "large" ), (!n || o & /*unpadded_box*/ - 2) && mr( + 2) && mi( e, "unpadded_box", /*unpadded_box*/ a[1] ), (!n || o & /*parent_height*/ - 8) && mr( + 8) && mi( e, "small_parent", /*parent_height*/ @@ -14255,12 +14255,12 @@ function f5(i) { h5(s, a), n = !1; }, d(a) { - a && Z0(e), s && s.d(a), i[6](null); + a && Z0(e), s && s.d(a), r[6](null); } }; } -function m5(i, e, t) { - let n, { $$slots: r = {}, $$scope: s } = e, { size: a = "small" } = e, { unpadded_box: o = !1 } = e, l; +function m5(r, e, t) { + let n, { $$slots: i = {}, $$scope: s } = e, { size: a = "small" } = e, { unpadded_box: o = !1 } = e, l; function u(h) { var d; if (!h) return !1; @@ -14268,16 +14268,16 @@ function m5(i, e, t) { return f > m + 2; } function c(h) { - i5[h ? "unshift" : "push"](() => { + r5[h ? "unshift" : "push"](() => { l = h, t(2, l); }); } - return i.$$set = (h) => { + return r.$$set = (h) => { "size" in h && t(0, a = h.size), "unpadded_box" in h && t(1, o = h.unpadded_box), "$$scope" in h && t(4, s = h.$$scope); - }, i.$$.update = () => { - i.$$.dirty & /*el*/ + }, r.$$.update = () => { + r.$$.dirty & /*el*/ 4 && t(3, n = u(l)); - }, [a, o, l, n, s, r, c]; + }, [a, o, l, n, s, i, c]; } class g5 extends t5 { constructor(e) { @@ -14298,8 +14298,8 @@ const { svg_element: tR } = window.__gradio__svelte__internal, { SvelteComponent: nR, - append_hydration: iR, - attr: rR, + append_hydration: rR, + attr: iR, children: sR, claim_svg_element: aR, detach: oR, @@ -14357,8 +14357,8 @@ const { safe_not_equal: tC, svg_element: nC } = window.__gradio__svelte__internal, { - SvelteComponent: iC, - append_hydration: rC, + SvelteComponent: rC, + append_hydration: iC, attr: sC, children: aC, claim_svg_element: oC, @@ -14415,9 +14415,9 @@ const { insert_hydration: eF, noop: tF, safe_not_equal: nF, - svg_element: iF + svg_element: rF } = window.__gradio__svelte__internal, { - SvelteComponent: rF, + SvelteComponent: iF, append_hydration: sF, attr: aF, children: oF, @@ -14431,7 +14431,7 @@ const { } = window.__gradio__svelte__internal, { SvelteComponent: p5, append_hydration: J0, - attr: ri, + attr: ir, children: Ao, claim_svg_element: xo, detach: ua, @@ -14439,14 +14439,14 @@ const { insert_hydration: v5, noop: eu, safe_not_equal: y5, - set_style: Ei, + set_style: Er, svg_element: wo } = window.__gradio__svelte__internal; -function b5(i) { - let e, t, n, r; +function b5(r) { + let e, t, n, i; return { c() { - e = wo("svg"), t = wo("g"), n = wo("path"), r = wo("path"), this.h(); + e = wo("svg"), t = wo("g"), n = wo("path"), i = wo("path"), this.h(); }, l(s) { e = xo(s, "svg", { @@ -14463,13 +14463,13 @@ function b5(i) { var a = Ao(e); t = xo(a, "g", { transform: !0 }); var o = Ao(t); - n = xo(o, "path", { d: !0, style: !0 }), Ao(n).forEach(ua), o.forEach(ua), r = xo(a, "path", { d: !0, style: !0 }), Ao(r).forEach(ua), a.forEach(ua), this.h(); + n = xo(o, "path", { d: !0, style: !0 }), Ao(n).forEach(ua), o.forEach(ua), i = xo(a, "path", { d: !0, style: !0 }), Ao(i).forEach(ua), a.forEach(ua), this.h(); }, h() { - ri(n, "d", "M18,6L6.087,17.913"), Ei(n, "fill", "none"), Ei(n, "fill-rule", "nonzero"), Ei(n, "stroke-width", "2px"), ri(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), ri(r, "d", "M4.364,4.364L19.636,19.636"), Ei(r, "fill", "none"), Ei(r, "fill-rule", "nonzero"), Ei(r, "stroke-width", "2px"), ri(e, "width", "100%"), ri(e, "height", "100%"), ri(e, "viewBox", "0 0 24 24"), ri(e, "version", "1.1"), ri(e, "xmlns", "http://www.w3.org/2000/svg"), ri(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), ri(e, "xml:space", "preserve"), ri(e, "stroke", "currentColor"), Ei(e, "fill-rule", "evenodd"), Ei(e, "clip-rule", "evenodd"), Ei(e, "stroke-linecap", "round"), Ei(e, "stroke-linejoin", "round"); + ir(n, "d", "M18,6L6.087,17.913"), Er(n, "fill", "none"), Er(n, "fill-rule", "nonzero"), Er(n, "stroke-width", "2px"), ir(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), ir(i, "d", "M4.364,4.364L19.636,19.636"), Er(i, "fill", "none"), Er(i, "fill-rule", "nonzero"), Er(i, "stroke-width", "2px"), ir(e, "width", "100%"), ir(e, "height", "100%"), ir(e, "viewBox", "0 0 24 24"), ir(e, "version", "1.1"), ir(e, "xmlns", "http://www.w3.org/2000/svg"), ir(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), ir(e, "xml:space", "preserve"), ir(e, "stroke", "currentColor"), Er(e, "fill-rule", "evenodd"), Er(e, "clip-rule", "evenodd"), Er(e, "stroke-linecap", "round"), Er(e, "stroke-linejoin", "round"); }, m(s, a) { - v5(s, e, a), J0(e, t), J0(t, n), J0(e, r); + v5(s, e, a), J0(e, t), J0(t, n), J0(e, i); }, p: eu, i: eu, @@ -14523,7 +14523,7 @@ const { } = window.__gradio__svelte__internal, { SvelteComponent: E5, append_hydration: S5, - attr: Ur, + attr: Ui, children: Rf, claim_svg_element: Cf, detach: tu, @@ -14533,7 +14533,7 @@ const { safe_not_equal: x5, svg_element: Ff } = window.__gradio__svelte__internal; -function w5(i) { +function w5(r) { let e, t; return { c() { @@ -14547,14 +14547,14 @@ function w5(i) { width: !0, height: !0 }); - var r = Rf(e); - t = Cf(r, "path", { d: !0, fill: !0 }), Rf(t).forEach(tu), r.forEach(tu), this.h(); + var i = Rf(e); + t = Cf(i, "path", { d: !0, fill: !0 }), Rf(t).forEach(tu), i.forEach(tu), this.h(); }, h() { - Ur(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), Ur(t, "fill", "currentColor"), Ur(e, "id", "icon"), Ur(e, "xmlns", "http://www.w3.org/2000/svg"), Ur(e, "viewBox", "0 0 32 32"), Ur(e, "width", "100%"), Ur(e, "height", "100%"); + Ui(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), Ui(t, "fill", "currentColor"), Ui(e, "id", "icon"), Ui(e, "xmlns", "http://www.w3.org/2000/svg"), Ui(e, "viewBox", "0 0 32 32"), Ui(e, "width", "100%"), Ui(e, "height", "100%"); }, - m(n, r) { - A5(n, e, r), S5(e, t); + m(n, i) { + A5(n, e, i), S5(e, t); }, p: nu, i: nu, @@ -14579,8 +14579,8 @@ const { init: eP, insert_hydration: tP, noop: nP, - safe_not_equal: iP, - svg_element: rP + safe_not_equal: rP, + svg_element: iP } = window.__gradio__svelte__internal, { SvelteComponent: sP, append_hydration: aP, @@ -14599,14 +14599,14 @@ const { attr: Ss, children: Pf, claim_svg_element: Mf, - detach: iu, + detach: ru, init: L5, insert_hydration: R5, - noop: ru, + noop: iu, safe_not_equal: C5, svg_element: Of } = window.__gradio__svelte__internal; -function F5(i) { +function F5(r) { let e, t; return { c() { @@ -14619,20 +14619,20 @@ function F5(i) { height: !0, viewBox: !0 }); - var r = Pf(e); - t = Mf(r, "path", { fill: !0, d: !0 }), Pf(t).forEach(iu), r.forEach(iu), this.h(); + var i = Pf(e); + t = Mf(i, "path", { fill: !0, d: !0 }), Pf(t).forEach(ru), i.forEach(ru), this.h(); }, h() { Ss(t, "fill", "currentColor"), Ss(t, "d", "M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"), Ss(e, "xmlns", "http://www.w3.org/2000/svg"), Ss(e, "width", "100%"), Ss(e, "height", "100%"), Ss(e, "viewBox", "0 0 32 32"); }, - m(n, r) { - R5(n, e, r), I5(e, t); + m(n, i) { + R5(n, e, i), I5(e, t); }, - p: ru, - i: ru, - o: ru, + p: iu, + i: iu, + o: iu, d(n) { - n && iu(e); + n && ru(e); } }; } @@ -14686,8 +14686,8 @@ const { detach: eM, init: tM, insert_hydration: nM, - noop: iM, - safe_not_equal: rM, + noop: rM, + safe_not_equal: iM, svg_element: sM } = window.__gradio__svelte__internal, { SvelteComponent: aM, @@ -14716,7 +14716,7 @@ const { } = window.__gradio__svelte__internal, { SvelteComponent: M5, append_hydration: O5, - attr: si, + attr: sr, children: Bf, claim_svg_element: Nf, detach: su, @@ -14726,7 +14726,7 @@ const { safe_not_equal: $5, svg_element: $f } = window.__gradio__svelte__internal; -function U5(i) { +function U5(r) { let e, t; return { c() { @@ -14745,16 +14745,16 @@ function U5(i) { width: !0, height: !0 }); - var r = Bf(e); - t = Nf(r, "path", { d: !0 }); + var i = Bf(e); + t = Nf(i, "path", { d: !0 }); var s = Bf(t); - s.forEach(su), r.forEach(su), this.h(); + s.forEach(su), i.forEach(su), this.h(); }, h() { - si(t, "d", "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"), si(e, "xmlns", "http://www.w3.org/2000/svg"), si(e, "viewBox", "0 0 24 24"), si(e, "fill", "none"), si(e, "stroke", "currentColor"), si(e, "stroke-width", "2"), si(e, "stroke-linecap", "round"), si(e, "stroke-linejoin", "round"), si(e, "class", "feather feather-maximize"), si(e, "width", "100%"), si(e, "height", "100%"); + sr(t, "d", "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"), sr(e, "xmlns", "http://www.w3.org/2000/svg"), sr(e, "viewBox", "0 0 24 24"), sr(e, "fill", "none"), sr(e, "stroke", "currentColor"), sr(e, "stroke-width", "2"), sr(e, "stroke-linecap", "round"), sr(e, "stroke-linejoin", "round"), sr(e, "class", "feather feather-maximize"), sr(e, "width", "100%"), sr(e, "height", "100%"); }, - m(n, r) { - N5(n, e, r), O5(e, t); + m(n, i) { + N5(n, e, i), O5(e, t); }, p: au, i: au, @@ -14794,14 +14794,14 @@ const { safe_not_equal: V5, svg_element: cu } = window.__gradio__svelte__internal; -function K5(i) { +function K5(r) { let e, t, n; return { c() { e = cu("svg"), t = cu("path"), n = cu("polyline"), this.h(); }, - l(r) { - e = lu(r, "svg", { + l(i) { + e = lu(i, "svg", { xmlns: !0, width: !0, height: !0, @@ -14819,14 +14819,14 @@ function K5(i) { h() { Gn(t, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), Gn(n, "points", "13 2 13 9 20 9"), Gn(e, "xmlns", "http://www.w3.org/2000/svg"), Gn(e, "width", "100%"), Gn(e, "height", "100%"), Gn(e, "viewBox", "0 0 24 24"), Gn(e, "fill", "none"), Gn(e, "stroke", "currentColor"), Gn(e, "stroke-width", "1.5"), Gn(e, "stroke-linecap", "round"), Gn(e, "stroke-linejoin", "round"), Gn(e, "class", "feather feather-file"); }, - m(r, s) { - q5(r, e, s), Uf(e, t), Uf(e, n); + m(i, s) { + q5(i, e, s), Uf(e, t), Uf(e, n); }, p: uu, i: uu, o: uu, - d(r) { - r && Do(e); + d(i) { + i && Do(e); } }; } @@ -14854,8 +14854,8 @@ const { children: eO, claim_svg_element: tO, detach: nO, - init: iO, - insert_hydration: rO, + init: rO, + insert_hydration: iO, noop: sO, safe_not_equal: aO, svg_element: oO @@ -14872,11 +14872,11 @@ const { safe_not_equal: Q5, svg_element: Lo } = window.__gradio__svelte__internal; -function Z5(i) { - let e, t, n, r; +function Z5(r) { + let e, t, n, i; return { c() { - e = Lo("svg"), t = Lo("rect"), n = Lo("circle"), r = Lo("polyline"), this.h(); + e = Lo("svg"), t = Lo("rect"), n = Lo("circle"), i = Lo("polyline"), this.h(); }, l(s) { e = Io(s, "svg", { @@ -14899,13 +14899,13 @@ function Z5(i) { height: !0, rx: !0, ry: !0 - }), ko(t).forEach(ca), n = Io(a, "circle", { cx: !0, cy: !0, r: !0 }), ko(n).forEach(ca), r = Io(a, "polyline", { points: !0 }), ko(r).forEach(ca), a.forEach(ca), this.h(); + }), ko(t).forEach(ca), n = Io(a, "circle", { cx: !0, cy: !0, r: !0 }), ko(n).forEach(ca), i = Io(a, "polyline", { points: !0 }), ko(i).forEach(ca), a.forEach(ca), this.h(); }, h() { - Dt(t, "x", "3"), Dt(t, "y", "3"), Dt(t, "width", "18"), Dt(t, "height", "18"), Dt(t, "rx", "2"), Dt(t, "ry", "2"), Dt(n, "cx", "8.5"), Dt(n, "cy", "8.5"), Dt(n, "r", "1.5"), Dt(r, "points", "21 15 16 10 5 21"), Dt(e, "xmlns", "http://www.w3.org/2000/svg"), Dt(e, "width", "100%"), Dt(e, "height", "100%"), Dt(e, "viewBox", "0 0 24 24"), Dt(e, "fill", "none"), Dt(e, "stroke", "currentColor"), Dt(e, "stroke-width", "1.5"), Dt(e, "stroke-linecap", "round"), Dt(e, "stroke-linejoin", "round"), Dt(e, "class", "feather feather-image"); + Dt(t, "x", "3"), Dt(t, "y", "3"), Dt(t, "width", "18"), Dt(t, "height", "18"), Dt(t, "rx", "2"), Dt(t, "ry", "2"), Dt(n, "cx", "8.5"), Dt(n, "cy", "8.5"), Dt(n, "r", "1.5"), Dt(i, "points", "21 15 16 10 5 21"), Dt(e, "xmlns", "http://www.w3.org/2000/svg"), Dt(e, "width", "100%"), Dt(e, "height", "100%"), Dt(e, "viewBox", "0 0 24 24"), Dt(e, "fill", "none"), Dt(e, "stroke", "currentColor"), Dt(e, "stroke-width", "1.5"), Dt(e, "stroke-linecap", "round"), Dt(e, "stroke-linejoin", "round"), Dt(e, "class", "feather feather-image"); }, m(s, a) { - X5(s, e, a), hu(e, t), hu(e, n), hu(e, r); + X5(s, e, a), hu(e, t), hu(e, n), hu(e, i); }, p: du, i: du, @@ -14930,10 +14930,10 @@ const { init: t6, insert_hydration: n6, noop: mu, - safe_not_equal: i6, + safe_not_equal: r6, svg_element: zf } = window.__gradio__svelte__internal; -function r6(i) { +function i6(r) { let e, t; return { c() { @@ -14946,14 +14946,14 @@ function r6(i) { height: !0, viewBox: !0 }); - var r = Hf(e); - t = Gf(r, "path", { fill: !0, d: !0 }), Hf(t).forEach(fu), r.forEach(fu), this.h(); + var i = Hf(e); + t = Gf(i, "path", { fill: !0, d: !0 }), Hf(t).forEach(fu), i.forEach(fu), this.h(); }, h() { Ts(t, "fill", "currentColor"), Ts(t, "d", "M200 32h-36.26a47.92 47.92 0 0 0-71.48 0H56a16 16 0 0 0-16 16v168a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-72 0a32 32 0 0 1 32 32H96a32 32 0 0 1 32-32m72 184H56V48h26.75A47.9 47.9 0 0 0 80 64v8a8 8 0 0 0 8 8h80a8 8 0 0 0 8-8v-8a47.9 47.9 0 0 0-2.75-16H200Z"), Ts(e, "xmlns", "http://www.w3.org/2000/svg"), Ts(e, "width", "100%"), Ts(e, "height", "100%"), Ts(e, "viewBox", "0 0 256 256"); }, - m(n, r) { - n6(n, e, r), e6(e, t); + m(n, i) { + n6(n, e, i), e6(e, t); }, p: mu, i: mu, @@ -14965,7 +14965,7 @@ function r6(i) { } class s6 extends J5 { constructor(e) { - super(), t6(this, e, null, r6, i6, {}); + super(), t6(this, e, null, i6, r6, {}); } } const { @@ -15021,8 +15021,8 @@ const { append_hydration: eB, attr: tB, children: nB, - claim_svg_element: iB, - detach: rB, + claim_svg_element: rB, + detach: iB, init: sB, insert_hydration: aB, noop: oB, @@ -15031,7 +15031,7 @@ const { } = window.__gradio__svelte__internal, { SvelteComponent: a6, append_hydration: o6, - attr: ai, + attr: ar, children: qf, claim_svg_element: Vf, detach: gu, @@ -15041,7 +15041,7 @@ const { safe_not_equal: c6, svg_element: Kf } = window.__gradio__svelte__internal; -function h6(i) { +function h6(r) { let e, t; return { c() { @@ -15060,14 +15060,14 @@ function h6(i) { width: !0, height: !0 }); - var r = qf(e); - t = Vf(r, "path", { d: !0 }), qf(t).forEach(gu), r.forEach(gu), this.h(); + var i = qf(e); + t = Vf(i, "path", { d: !0 }), qf(t).forEach(gu), i.forEach(gu), this.h(); }, h() { - ai(t, "d", "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"), ai(e, "xmlns", "http://www.w3.org/2000/svg"), ai(e, "viewBox", "0 0 24 24"), ai(e, "fill", "none"), ai(e, "stroke", "currentColor"), ai(e, "stroke-width", "2"), ai(e, "stroke-linecap", "round"), ai(e, "stroke-linejoin", "round"), ai(e, "class", "feather feather-minimize"), ai(e, "width", "100%"), ai(e, "height", "100%"); + ar(t, "d", "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"), ar(e, "xmlns", "http://www.w3.org/2000/svg"), ar(e, "viewBox", "0 0 24 24"), ar(e, "fill", "none"), ar(e, "stroke", "currentColor"), ar(e, "stroke-width", "2"), ar(e, "stroke-linecap", "round"), ar(e, "stroke-linejoin", "round"), ar(e, "class", "feather feather-minimize"), ar(e, "width", "100%"), ar(e, "height", "100%"); }, - m(n, r) { - u6(n, e, r), o6(e, t); + m(n, i) { + u6(n, e, i), o6(e, t); }, p: pu, i: pu, @@ -15134,8 +15134,8 @@ const { SvelteComponent: eN, append_hydration: tN, attr: nN, - children: iN, - claim_svg_element: rN, + children: rN, + claim_svg_element: iN, detach: sN, init: aN, insert_hydration: oN, @@ -15145,7 +15145,7 @@ const { } = window.__gradio__svelte__internal, { SvelteComponent: f6, append_hydration: m6, - attr: Si, + attr: Sr, children: jf, claim_svg_element: Wf, detach: _u, @@ -15155,7 +15155,7 @@ const { safe_not_equal: _6, svg_element: Yf } = window.__gradio__svelte__internal; -function v6(i) { +function v6(r) { let e, t; return { c() { @@ -15173,14 +15173,14 @@ function v6(i) { "stroke-linecap": !0, "stroke-linejoin": !0 }); - var r = jf(e); - t = Wf(r, "polygon", { points: !0 }), jf(t).forEach(_u), r.forEach(_u), this.h(); + var i = jf(e); + t = Wf(i, "polygon", { points: !0 }), jf(t).forEach(_u), i.forEach(_u), this.h(); }, h() { - Si(t, "points", "5 3 19 12 5 21 5 3"), Si(e, "xmlns", "http://www.w3.org/2000/svg"), Si(e, "width", "100%"), Si(e, "height", "100%"), Si(e, "viewBox", "0 0 24 24"), Si(e, "fill", "currentColor"), Si(e, "stroke", "currentColor"), Si(e, "stroke-width", "1.5"), Si(e, "stroke-linecap", "round"), Si(e, "stroke-linejoin", "round"); + Sr(t, "points", "5 3 19 12 5 21 5 3"), Sr(e, "xmlns", "http://www.w3.org/2000/svg"), Sr(e, "width", "100%"), Sr(e, "height", "100%"), Sr(e, "viewBox", "0 0 24 24"), Sr(e, "fill", "currentColor"), Sr(e, "stroke", "currentColor"), Sr(e, "stroke-width", "1.5"), Sr(e, "stroke-linecap", "round"), Sr(e, "stroke-linejoin", "round"); }, - m(n, r) { - p6(n, e, r), m6(e, t); + m(n, i) { + p6(n, e, i), m6(e, t); }, p: vu, i: vu, @@ -15246,8 +15246,8 @@ const { svg_element: t$ } = window.__gradio__svelte__internal, { SvelteComponent: n$, - append_hydration: i$, - attr: r$, + append_hydration: r$, + attr: i$, children: s$, claim_svg_element: a$, detach: o$, @@ -15305,8 +15305,8 @@ const { safe_not_equal: tU, svg_element: nU } = window.__gradio__svelte__internal, { - SvelteComponent: iU, - append_hydration: rU, + SvelteComponent: rU, + append_hydration: iU, attr: sU, children: aU, claim_svg_element: oU, @@ -15363,8 +15363,8 @@ const { detach: eH, init: tH, insert_hydration: nH, - noop: iH, - safe_not_equal: rH, + noop: rH, + safe_not_equal: iH, svg_element: sH } = window.__gradio__svelte__internal, { SvelteComponent: aH, @@ -15391,11 +15391,11 @@ const { safe_not_equal: S6, svg_element: Fo } = window.__gradio__svelte__internal; -function T6(i) { - let e, t, n, r; +function T6(r) { + let e, t, n, i; return { c() { - e = Fo("svg"), t = Fo("path"), n = Fo("polyline"), r = Fo("line"), this.h(); + e = Fo("svg"), t = Fo("path"), n = Fo("polyline"), i = Fo("line"), this.h(); }, l(s) { e = Co(s, "svg", { @@ -15411,13 +15411,13 @@ function T6(i) { class: !0 }); var a = Ro(e); - t = Co(a, "path", { d: !0 }), Ro(t).forEach(ha), n = Co(a, "polyline", { points: !0 }), Ro(n).forEach(ha), r = Co(a, "line", { x1: !0, y1: !0, x2: !0, y2: !0 }), Ro(r).forEach(ha), a.forEach(ha), this.h(); + t = Co(a, "path", { d: !0 }), Ro(t).forEach(ha), n = Co(a, "polyline", { points: !0 }), Ro(n).forEach(ha), i = Co(a, "line", { x1: !0, y1: !0, x2: !0, y2: !0 }), Ro(i).forEach(ha), a.forEach(ha), this.h(); }, h() { - nn(t, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), nn(n, "points", "17 8 12 3 7 8"), nn(r, "x1", "12"), nn(r, "y1", "3"), nn(r, "x2", "12"), nn(r, "y2", "15"), nn(e, "xmlns", "http://www.w3.org/2000/svg"), nn(e, "width", "90%"), nn(e, "height", "90%"), nn(e, "viewBox", "0 0 24 24"), nn(e, "fill", "none"), nn(e, "stroke", "currentColor"), nn(e, "stroke-width", "2"), nn(e, "stroke-linecap", "round"), nn(e, "stroke-linejoin", "round"), nn(e, "class", "feather feather-upload"); + nn(t, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), nn(n, "points", "17 8 12 3 7 8"), nn(i, "x1", "12"), nn(i, "y1", "3"), nn(i, "x2", "12"), nn(i, "y2", "15"), nn(e, "xmlns", "http://www.w3.org/2000/svg"), nn(e, "width", "90%"), nn(e, "height", "90%"), nn(e, "viewBox", "0 0 24 24"), nn(e, "fill", "none"), nn(e, "stroke", "currentColor"), nn(e, "stroke-width", "2"), nn(e, "stroke-linecap", "round"), nn(e, "stroke-linejoin", "round"), nn(e, "class", "feather feather-upload"); }, m(s, a) { - E6(s, e, a), yu(e, t), yu(e, n), yu(e, r); + E6(s, e, a), yu(e, t), yu(e, n), yu(e, i); }, p: bu, i: bu, @@ -15475,8 +15475,8 @@ const { children: eG, claim_svg_element: tG, claim_text: nG, - detach: iG, - init: rG, + detach: rG, + init: iG, insert_hydration: sG, noop: aG, safe_not_equal: oG, @@ -15533,9 +15533,9 @@ const { insert_hydration: ez, noop: tz, safe_not_equal: nz, - svg_element: iz + svg_element: rz } = window.__gradio__svelte__internal, { - SvelteComponent: rz, + SvelteComponent: iz, append_hydration: sz, attr: az, children: oz, @@ -15592,8 +15592,8 @@ const { init: eq, insert_hydration: tq, noop: nq, - safe_not_equal: iq, - svg_element: rq + safe_not_equal: rq, + svg_element: iq } = window.__gradio__svelte__internal, { SvelteComponent: sq, append_hydration: aq, @@ -15911,8 +15911,8 @@ const { } }; A6.reduce( - (i, { color: e, primary: t, secondary: n }) => ({ - ...i, + (r, { color: e, primary: t, secondary: n }) => ({ + ...r, [e]: { primary: Xf[e][t], secondary: Xf[e][n] @@ -15920,28 +15920,28 @@ A6.reduce( }), {} ); -class rl extends Error { +class il extends Error { constructor(e) { super(e), this.name = "ShareError"; } } -async function x6(i, e) { +async function x6(r, e) { var l; if (window.__gradio_space__ == null) - throw new rl("Must be on Spaces to share."); - let t, n, r; + throw new il("Must be on Spaces to share."); + let t, n, i; { let u; - if (typeof i == "object" && i.url) - u = i.url; - else if (typeof i == "string") - u = i; + if (typeof r == "object" && r.url) + u = r.url; + else if (typeof r == "string") + u = r; else throw new Error("Invalid data format for URL type"); const c = await fetch(u); - t = await c.blob(), n = c.headers.get("content-type") || "", r = c.headers.get("content-disposition") || ""; + t = await c.blob(), n = c.headers.get("content-type") || "", i = c.headers.get("content-disposition") || ""; } - const s = new File([t], r, { type: n }), a = await fetch("https://huggingface.co/uploads", { + const s = new File([t], i, { type: n }), a = await fetch("https://huggingface.co/uploads", { method: "POST", body: s, headers: { @@ -15952,9 +15952,9 @@ async function x6(i, e) { if (!a.ok) { if ((l = a.headers.get("content-type")) != null && l.includes("application/json")) { const u = await a.json(); - throw new rl(`Upload failed: ${u.error}`); + throw new il(`Upload failed: ${u.error}`); } - throw new rl("Upload failed."); + throw new il("Upload failed."); } return await a.text(); } @@ -15969,24 +15969,24 @@ const { transition_in: F6, transition_out: P6 } = window.__gradio__svelte__internal, { createEventDispatcher: M6 } = window.__gradio__svelte__internal; -function O6(i) { +function O6(r) { let e, t; - return e = new Pr({ + return e = new Pi({ props: { Icon: D5, label: ( /*i18n*/ - i[2]("common.share") + r[2]("common.share") ), pending: ( /*pending*/ - i[3] + r[3] ) } }), e.$on( "click", /*click_handler*/ - i[5] + r[5] ), { c() { k6(e.$$.fragment); @@ -15994,14 +15994,14 @@ function O6(i) { l(n) { D6(e.$$.fragment, n); }, - m(n, r) { - R6(e, n, r), t = !0; + m(n, i) { + R6(e, n, i), t = !0; }, - p(n, [r]) { + p(n, [i]) { const s = {}; - r & /*i18n*/ + i & /*i18n*/ 4 && (s.label = /*i18n*/ - n[2]("common.share")), r & /*pending*/ + n[2]("common.share")), i & /*pending*/ 8 && (s.pending = /*pending*/ n[3]), e.$set(s); }, @@ -16016,25 +16016,25 @@ function O6(i) { } }; } -function B6(i, e, t) { +function B6(r, e, t) { const n = M6(); - let { formatter: r } = e, { value: s } = e, { i18n: a } = e, o = !1; + let { formatter: i } = e, { value: s } = e, { i18n: a } = e, o = !1; const l = async () => { try { t(3, o = !0); - const u = await r(s); + const u = await i(s); n("share", { description: u }); } catch (u) { console.error(u); - let c = u instanceof rl ? u.message : "Share failed."; + let c = u instanceof il ? u.message : "Share failed."; n("error", c); } finally { t(3, o = !1); } }; - return i.$$set = (u) => { - "formatter" in u && t(0, r = u.formatter), "value" in u && t(1, s = u.value), "i18n" in u && t(2, a = u.i18n); - }, [r, s, a, o, n, l]; + return r.$$set = (u) => { + "formatter" in u && t(0, i = u.formatter), "value" in u && t(1, s = u.value), "i18n" in u && t(2, a = u.i18n); + }, [i, s, a, o, n, l]; } class N6 extends w6 { constructor(e) { @@ -16042,11 +16042,11 @@ class N6 extends w6 { } } const $6 = /^(#\s*)(.+)$/m; -function U6(i) { - const e = i.trim(), t = e.match($6); +function U6(r) { + const e = r.trim(), t = e.match($6); if (!t) return [!1, e || !1]; - const [n, , r] = t, s = r.trim(); + const [n, , i] = t, s = i.trim(); if (e === n) return [s, !1]; const a = t.index !== void 0 ? t.index + n.length : 0, l = e.substring(a).trim() || !1; @@ -16054,14 +16054,14 @@ function U6(i) { } const { SvelteComponent: H6, - append_hydration: Qr, + append_hydration: Qi, attr: Ba, check_outros: G6, children: Na, claim_component: T_, claim_element: $a, claim_space: p0, - claim_text: Wr, + claim_text: Wi, create_component: A_, destroy_component: x_, detach: sn, @@ -16069,17 +16069,17 @@ const { empty: Al, group_outros: z6, init: q6, - insert_hydration: yi, + insert_hydration: yr, mount_component: w_, safe_not_equal: V6, set_data: Ha, space: _0, - text: Yr, + text: Yi, toggle_class: Qf, transition_in: xl, transition_out: wl } = window.__gradio__svelte__internal; -function K6(i) { +function K6(r) { let e, t; return e = new S_({}), { c() { @@ -16088,8 +16088,8 @@ function K6(i) { l(n) { T_(e.$$.fragment, n); }, - m(n, r) { - w_(e, n, r), t = !0; + m(n, i) { + w_(e, n, i), t = !0; }, i(n) { t || (xl(e.$$.fragment, n), t = !0); @@ -16102,7 +16102,7 @@ function K6(i) { } }; } -function j6(i) { +function j6(r) { let e, t; return e = new s6({}), { c() { @@ -16111,8 +16111,8 @@ function j6(i) { l(n) { T_(e.$$.fragment, n); }, - m(n, r) { - w_(e, n, r), t = !0; + m(n, i) { + w_(e, n, i), t = !0; }, i(n) { t || (xl(e.$$.fragment, n), t = !0); @@ -16125,30 +16125,30 @@ function j6(i) { } }; } -function W6(i) { +function W6(r) { let e = ( /*i18n*/ - i[1]( + r[1]( /*defs*/ - i[7][ + r[7][ /*type*/ - i[0] + r[0] ] || /*defs*/ - i[7].file + r[7].file ) + "" - ), t, n, r, s = ( + ), t, n, i, s = ( /*mode*/ - i[3] !== "short" && Zf(i) + r[3] !== "short" && Zf(r) ); return { c() { - t = Yr(e), n = _0(), s && s.c(), r = Al(); + t = Yi(e), n = _0(), s && s.c(), i = Al(); }, l(a) { - t = Wr(a, e), n = p0(a), s && s.l(a), r = Al(); + t = Wi(a, e), n = p0(a), s && s.l(a), i = Al(); }, m(a, o) { - yi(a, t, o), yi(a, n, o), s && s.m(a, o), yi(a, r, o); + yr(a, t, o), yr(a, n, o), s && s.m(a, o), yr(a, i, o); }, p(a, o) { o & /*i18n, type*/ @@ -16161,69 +16161,69 @@ function W6(i) { ] || /*defs*/ a[7].file ) + "") && Ha(t, e), /*mode*/ - a[3] !== "short" ? s ? s.p(a, o) : (s = Zf(a), s.c(), s.m(r.parentNode, r)) : s && (s.d(1), s = null); + a[3] !== "short" ? s ? s.p(a, o) : (s = Zf(a), s.c(), s.m(i.parentNode, i)) : s && (s.d(1), s = null); }, d(a) { - a && (sn(t), sn(n), sn(r)), s && s.d(a); + a && (sn(t), sn(n), sn(i)), s && s.d(a); } }; } -function Y6(i) { +function Y6(r) { let e, t, n = ( /*heading*/ - i[6] && Jf(i) - ), r = ( + r[6] && Jf(r) + ), i = ( /*paragraph*/ - i[5] && em(i) + r[5] && em(r) ); return { c() { - n && n.c(), e = _0(), r && r.c(), t = Al(); + n && n.c(), e = _0(), i && i.c(), t = Al(); }, l(s) { - n && n.l(s), e = p0(s), r && r.l(s), t = Al(); + n && n.l(s), e = p0(s), i && i.l(s), t = Al(); }, m(s, a) { - n && n.m(s, a), yi(s, e, a), r && r.m(s, a), yi(s, t, a); + n && n.m(s, a), yr(s, e, a), i && i.m(s, a), yr(s, t, a); }, p(s, a) { /*heading*/ s[6] ? n ? n.p(s, a) : (n = Jf(s), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null), /*paragraph*/ - s[5] ? r ? r.p(s, a) : (r = em(s), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null); + s[5] ? i ? i.p(s, a) : (i = em(s), i.c(), i.m(t.parentNode, t)) : i && (i.d(1), i = null); }, d(s) { - s && (sn(e), sn(t)), n && n.d(s), r && r.d(s); + s && (sn(e), sn(t)), n && n.d(s), i && i.d(s); } }; } -function Zf(i) { +function Zf(r) { let e, t, n = ( /*i18n*/ - i[1]("common.or") + "" - ), r, s, a, o = ( + r[1]("common.or") + "" + ), i, s, a, o = ( /*message*/ - (i[2] || /*i18n*/ - i[1]("upload_text.click_to_upload")) + "" + (r[2] || /*i18n*/ + r[1]("upload_text.click_to_upload")) + "" ), l; return { c() { - e = Ua("span"), t = Yr("- "), r = Yr(n), s = Yr(" -"), a = _0(), l = Yr(o), this.h(); + e = Ua("span"), t = Yi("- "), i = Yi(n), s = Yi(" -"), a = _0(), l = Yi(o), this.h(); }, l(u) { e = $a(u, "SPAN", { class: !0 }); var c = Na(e); - t = Wr(c, "- "), r = Wr(c, n), s = Wr(c, " -"), c.forEach(sn), a = p0(u), l = Wr(u, o), this.h(); + t = Wi(c, "- "), i = Wi(c, n), s = Wi(c, " -"), c.forEach(sn), a = p0(u), l = Wi(u, o), this.h(); }, h() { Ba(e, "class", "or svelte-1xg7h5n"); }, m(u, c) { - yi(u, e, c), Qr(e, t), Qr(e, r), Qr(e, s), yi(u, a, c), yi(u, l, c); + yr(u, e, c), Qi(e, t), Qi(e, i), Qi(e, s), yr(u, a, c), yr(u, l, c); }, p(u, c) { c & /*i18n*/ 2 && n !== (n = /*i18n*/ - u[1]("common.or") + "") && Ha(r, n), c & /*message, i18n*/ + u[1]("common.or") + "") && Ha(i, n), c & /*message, i18n*/ 6 && o !== (o = /*message*/ (u[2] || /*i18n*/ u[1]("upload_text.click_to_upload")) + "") && Ha(l, o); @@ -16233,32 +16233,32 @@ function Zf(i) { } }; } -function Jf(i) { +function Jf(r) { let e, t; return { c() { - e = Ua("h2"), t = Yr( + e = Ua("h2"), t = Yi( /*heading*/ - i[6] + r[6] ), this.h(); }, l(n) { e = $a(n, "H2", { class: !0 }); - var r = Na(e); - t = Wr( - r, + var i = Na(e); + t = Wi( + i, /*heading*/ - i[6] - ), r.forEach(sn), this.h(); + r[6] + ), i.forEach(sn), this.h(); }, h() { Ba(e, "class", "svelte-1xg7h5n"); }, - m(n, r) { - yi(n, e, r), Qr(e, t); + m(n, i) { + yr(n, e, i), Qi(e, t); }, - p(n, r) { - r & /*heading*/ + p(n, i) { + i & /*heading*/ 64 && Ha( t, /*heading*/ @@ -16270,32 +16270,32 @@ function Jf(i) { } }; } -function em(i) { +function em(r) { let e, t; return { c() { - e = Ua("p"), t = Yr( + e = Ua("p"), t = Yi( /*paragraph*/ - i[5] + r[5] ), this.h(); }, l(n) { e = $a(n, "P", { class: !0 }); - var r = Na(e); - t = Wr( - r, + var i = Na(e); + t = Wi( + i, /*paragraph*/ - i[5] - ), r.forEach(sn), this.h(); + r[5] + ), i.forEach(sn), this.h(); }, h() { Ba(e, "class", "svelte-1xg7h5n"); }, - m(n, r) { - yi(n, e, r), Qr(e, t); + m(n, i) { + yr(n, e, i), Qi(e, t); }, - p(n, r) { - r & /*paragraph*/ + p(n, i) { + i & /*paragraph*/ 32 && Ha( t, /*paragraph*/ @@ -16307,8 +16307,8 @@ function em(i) { } }; } -function X6(i) { - let e, t, n, r, s, a; +function X6(r) { + let e, t, n, i, s, a; const o = [j6, K6], l = []; function u(f, m) { return ( @@ -16316,7 +16316,7 @@ function X6(i) { f[0] === "clipboard" ? 0 : 1 ); } - n = u(i), r = l[n] = o[n](i); + n = u(r), i = l[n] = o[n](r); function c(f, m) { return ( /*heading*/ @@ -16324,34 +16324,34 @@ function X6(i) { f[5] ? Y6 : W6 ); } - let h = c(i), d = h(i); + let h = c(r), d = h(r); return { c() { - e = Ua("div"), t = Ua("span"), r.c(), s = _0(), d.c(), this.h(); + e = Ua("div"), t = Ua("span"), i.c(), s = _0(), d.c(), this.h(); }, l(f) { e = $a(f, "DIV", { class: !0 }); var m = Na(e); t = $a(m, "SPAN", { class: !0 }); var g = Na(t); - r.l(g), g.forEach(sn), s = p0(m), d.l(m), m.forEach(sn), this.h(); + i.l(g), g.forEach(sn), s = p0(m), d.l(m), m.forEach(sn), this.h(); }, h() { Ba(t, "class", "icon-wrap svelte-1xg7h5n"), Qf( t, "hovered", /*hovered*/ - i[4] + r[4] ), Ba(e, "class", "wrap svelte-1xg7h5n"); }, m(f, m) { - yi(f, e, m), Qr(e, t), l[n].m(t, null), Qr(e, s), d.m(e, null), a = !0; + yr(f, e, m), Qi(e, t), l[n].m(t, null), Qi(e, s), d.m(e, null), a = !0; }, p(f, [m]) { let g = n; n = u(f), n !== g && (z6(), wl(l[g], 1, 1, () => { l[g] = null; - }), G6(), r = l[n], r || (r = l[n] = o[n](f), r.c()), xl(r, 1), r.m(t, null)), (!a || m & /*hovered*/ + }), G6(), i = l[n], i || (i = l[n] = o[n](f), i.c()), xl(i, 1), i.m(t, null)), (!a || m & /*hovered*/ 16) && Qf( t, "hovered", @@ -16360,18 +16360,18 @@ function X6(i) { ), h === (h = c(f)) && d ? d.p(f, m) : (d.d(1), d = h(f), d && (d.c(), d.m(e, null))); }, i(f) { - a || (xl(r), a = !0); + a || (xl(i), a = !0); }, o(f) { - wl(r), a = !1; + wl(i), a = !1; }, d(f) { f && sn(e), l[n].d(), d.d(); } }; } -function Q6(i, e, t) { - let n, r, { type: s = "file" } = e, { i18n: a } = e, { message: o = void 0 } = e, { mode: l = "full" } = e, { hovered: u = !1 } = e, { placeholder: c = void 0 } = e; +function Q6(r, e, t) { + let n, i, { type: s = "file" } = e, { i18n: a } = e, { message: o = void 0 } = e, { mode: l = "full" } = e, { hovered: u = !1 } = e, { placeholder: c = void 0 } = e; const h = { image: "upload_text.drop_image", video: "upload_text.drop_video", @@ -16381,12 +16381,12 @@ function Q6(i, e, t) { gallery: "upload_text.drop_gallery", clipboard: "upload_text.paste_clipboard" }; - return i.$$set = (d) => { + return r.$$set = (d) => { "type" in d && t(0, s = d.type), "i18n" in d && t(1, a = d.i18n), "message" in d && t(2, o = d.message), "mode" in d && t(3, l = d.mode), "hovered" in d && t(4, u = d.hovered), "placeholder" in d && t(8, c = d.placeholder); - }, i.$$.update = () => { - i.$$.dirty & /*placeholder*/ - 256 && t(6, [n, r] = c ? U6(c) : [!1, !1], n, (t(5, r), t(8, c))); - }, [s, a, o, l, u, r, n, h, c]; + }, r.$$.update = () => { + r.$$.dirty & /*placeholder*/ + 256 && t(6, [n, i] = c ? U6(c) : [!1, !1], n, (t(5, i), t(8, c))); + }, [s, a, o, l, u, i, n, h, c]; } class Z6 extends H6 { constructor(e) { @@ -16448,32 +16448,32 @@ const { claim_element: tE, create_slot: nE, detach: nm, - element: iE, - get_all_dirty_from_scope: rE, + element: rE, + get_all_dirty_from_scope: iE, get_slot_changes: sE, init: aE, insert_hydration: oE, - null_to_empty: im, + null_to_empty: rm, safe_not_equal: lE, transition_in: uE, transition_out: cE, update_slot_base: hE } = window.__gradio__svelte__internal; -function dE(i) { +function dE(r) { let e, t, n; - const r = ( + const i = ( /*#slots*/ - i[3].default + r[3].default ), s = nE( - r, i, + r, /*$$scope*/ - i[2], + r[2], null ); return { c() { - e = iE("div"), s && s.c(), this.h(); + e = rE("div"), s && s.c(), this.h(); }, l(a) { e = tE(a, "DIV", { class: !0 }); @@ -16481,9 +16481,9 @@ function dE(i) { s && s.l(o), o.forEach(nm), this.h(); }, h() { - tm(e, "class", t = im(`icon-button-wrapper ${/*top_panel*/ - i[0] ? "top-panel" : ""} ${/*display_top_corner*/ - i[1] ? "display-top-corner" : "hide-top-corner"}`) + " svelte-109se4"); + tm(e, "class", t = rm(`icon-button-wrapper ${/*top_panel*/ + r[0] ? "top-panel" : ""} ${/*display_top_corner*/ + r[1] ? "display-top-corner" : "hide-top-corner"}`) + " svelte-109se4"); }, m(a, o) { oE(a, e, o), s && s.m(e, null), n = !0; @@ -16492,23 +16492,23 @@ function dE(i) { s && s.p && (!n || o & /*$$scope*/ 4) && hE( s, - r, + i, a, /*$$scope*/ a[2], n ? sE( - r, + i, /*$$scope*/ a[2], o, null - ) : rE( + ) : iE( /*$$scope*/ a[2] ), null ), (!n || o & /*top_panel, display_top_corner*/ - 3 && t !== (t = im(`icon-button-wrapper ${/*top_panel*/ + 3 && t !== (t = rm(`icon-button-wrapper ${/*top_panel*/ a[0] ? "top-panel" : ""} ${/*display_top_corner*/ a[1] ? "display-top-corner" : "hide-top-corner"}`) + " svelte-109se4")) && tm(e, "class", t); }, @@ -16523,11 +16523,11 @@ function dE(i) { } }; } -function fE(i, e, t) { - let { $$slots: n = {}, $$scope: r } = e, { top_panel: s = !0 } = e, { display_top_corner: a = !1 } = e; - return i.$$set = (o) => { - "top_panel" in o && t(0, s = o.top_panel), "display_top_corner" in o && t(1, a = o.display_top_corner), "$$scope" in o && t(2, r = o.$$scope); - }, [s, a, r, n]; +function fE(r, e, t) { + let { $$slots: n = {}, $$scope: i } = e, { top_panel: s = !0 } = e, { display_top_corner: a = !1 } = e; + return r.$$set = (o) => { + "top_panel" in o && t(0, s = o.top_panel), "display_top_corner" in o && t(1, a = o.display_top_corner), "$$scope" in o && t(2, i = o.$$scope); + }, [s, a, i, n]; } class D_ extends J6 { constructor(e) { @@ -16541,7 +16541,7 @@ const { create_component: I_, destroy_component: L_, detach: pE, - empty: rm, + empty: im, group_outros: _E, init: vE, insert_hydration: yE, @@ -16551,14 +16551,14 @@ const { transition_in: Dl, transition_out: kl } = window.__gradio__svelte__internal, { createEventDispatcher: EE } = window.__gradio__svelte__internal; -function SE(i) { +function SE(r) { let e, t; - return e = new Pr({ + return e = new Pi({ props: { Icon: H5, label: "Fullscreen" } }), e.$on( "click", /*click_handler_1*/ - i[3] + r[3] ), { c() { I_(e.$$.fragment); @@ -16566,8 +16566,8 @@ function SE(i) { l(n) { k_(e.$$.fragment, n); }, - m(n, r) { - R_(e, n, r), t = !0; + m(n, i) { + R_(e, n, i), t = !0; }, p: C_, i(n) { @@ -16581,9 +16581,9 @@ function SE(i) { } }; } -function TE(i) { +function TE(r) { let e, t; - return e = new Pr({ + return e = new Pi({ props: { Icon: d6, label: "Exit fullscreen mode" @@ -16591,7 +16591,7 @@ function TE(i) { }), e.$on( "click", /*click_handler*/ - i[2] + r[2] ), { c() { I_(e.$$.fragment); @@ -16599,8 +16599,8 @@ function TE(i) { l(n) { k_(e.$$.fragment, n); }, - m(n, r) { - R_(e, n, r), t = !0; + m(n, i) { + R_(e, n, i), t = !0; }, p: C_, i(n) { @@ -16614,8 +16614,8 @@ function TE(i) { } }; } -function AE(i) { - let e, t, n, r; +function AE(r) { + let e, t, n, i; const s = [TE, SE], a = []; function o(l, u) { return ( @@ -16623,15 +16623,15 @@ function AE(i) { l[0] ? 0 : 1 ); } - return e = o(i), t = a[e] = s[e](i), { + return e = o(r), t = a[e] = s[e](r), { c() { - t.c(), n = rm(); + t.c(), n = im(); }, l(l) { - t.l(l), n = rm(); + t.l(l), n = im(); }, m(l, u) { - a[e].m(l, u), yE(l, n, u), r = !0; + a[e].m(l, u), yE(l, n, u), i = !0; }, p(l, [u]) { let c = e; @@ -16640,23 +16640,23 @@ function AE(i) { }), gE(), t = a[e], t ? t.p(l, u) : (t = a[e] = s[e](l), t.c()), Dl(t, 1), t.m(n.parentNode, n)); }, i(l) { - r || (Dl(t), r = !0); + i || (Dl(t), i = !0); }, o(l) { - kl(t), r = !1; + kl(t), i = !1; }, d(l) { l && pE(n), a[e].d(l); } }; } -function xE(i, e, t) { +function xE(r, e, t) { const n = EE(); - let { fullscreen: r } = e; + let { fullscreen: i } = e; const s = () => n("fullscreen", !1), a = () => n("fullscreen", !0); - return i.$$set = (o) => { - "fullscreen" in o && t(0, r = o.fullscreen); - }, [r, n, s, a]; + return r.$$set = (o) => { + "fullscreen" in o && t(0, i = o.fullscreen); + }, [i, n, s, a]; } class wE extends mE { constructor(e) { @@ -16664,8 +16664,8 @@ class wE extends mE { } } new Intl.Collator(0, { numeric: 1 }).compare; -async function DE(i, e) { - return i.map( +async function DE(r, e) { + return r.map( (t) => new kE({ path: t.name, orig_name: t.name, @@ -16681,91 +16681,91 @@ class kE { path: e, url: t, orig_name: n, - size: r, + size: i, blob: s, is_stream: a, mime_type: o, alt_text: l, b64: u }) { - this.meta = { _type: "gradio.FileData" }, this.path = e, this.url = t, this.orig_name = n, this.size = r, this.blob = t ? void 0 : s, this.is_stream = a, this.mime_type = o, this.alt_text = l, this.b64 = u; + this.meta = { _type: "gradio.FileData" }, this.path = e, this.url = t, this.orig_name = n, this.size = i, this.blob = t ? void 0 : s, this.is_stream = a, this.mime_type = o, this.alt_text = l, this.b64 = u; } } typeof process < "u" && process.versions && process.versions.node; -var nr; +var ni; class tV extends TransformStream { /** Constructs a new instance. */ constructor(t = { allowCR: !1 }) { super({ - transform: (n, r) => { - for (n = ys(this, nr) + n; ; ) { + transform: (n, i) => { + for (n = ys(this, ni) + n; ; ) { const s = n.indexOf(` `), a = t.allowCR ? n.indexOf("\r") : -1; if (a !== -1 && a !== n.length - 1 && (s === -1 || s - 1 > a)) { - r.enqueue(n.slice(0, a)), n = n.slice(a + 1); + i.enqueue(n.slice(0, a)), n = n.slice(a + 1); continue; } if (s === -1) break; const o = n[s - 1] === "\r" ? s - 1 : s; - r.enqueue(n.slice(0, o)), n = n.slice(s + 1); + i.enqueue(n.slice(0, o)), n = n.slice(s + 1); } - Ld(this, nr, n); + Ld(this, ni, n); }, flush: (n) => { - if (ys(this, nr) === "") + if (ys(this, ni) === "") return; - const r = t.allowCR && ys(this, nr).endsWith("\r") ? ys(this, nr).slice(0, -1) : ys(this, nr); - n.enqueue(r); + const i = t.allowCR && ys(this, ni).endsWith("\r") ? ys(this, ni).slice(0, -1) : ys(this, ni); + n.enqueue(i); } }); - R0(this, nr, ""); + R0(this, ni, ""); } } -nr = new WeakMap(); -function Zr() { +ni = new WeakMap(); +function Zi() { } -function IE(i) { - return i(); +function IE(r) { + return r(); } -function LE(i) { - return typeof i == "function"; +function LE(r) { + return typeof r == "function"; } -function RE(i, ...e) { - if (i == null) { +function RE(r, ...e) { + if (r == null) { for (const n of e) n(void 0); - return Zr; + return Zi; } - const t = i.subscribe(...e); + const t = r.subscribe(...e); return t.unsubscribe ? () => t.unsubscribe() : t; } const F_ = typeof window < "u"; -let sm = F_ ? () => window.performance.now() : () => Date.now(), P_ = F_ ? (i) => requestAnimationFrame(i) : Zr; +let sm = F_ ? () => window.performance.now() : () => Date.now(), P_ = F_ ? (r) => requestAnimationFrame(r) : Zi; const Ns = /* @__PURE__ */ new Set(); -function M_(i) { +function M_(r) { Ns.forEach((e) => { - e.c(i) || (Ns.delete(e), e.f()); + e.c(r) || (Ns.delete(e), e.f()); }), Ns.size !== 0 && P_(M_); } -function CE(i) { +function CE(r) { let e; return Ns.size === 0 && P_(M_), { promise: new Promise((t) => { - Ns.add(e = { c: i, f: t }); + Ns.add(e = { c: r, f: t }); }), abort() { Ns.delete(e); } }; } const As = []; -function FE(i, e) { - return { subscribe: no(i, e).subscribe }; +function FE(r, e) { + return { subscribe: no(r, e).subscribe }; } -function no(i, e = Zr) { +function no(r, e = Zi) { let t; const n = /* @__PURE__ */ new Set(); - function r(a) { - if (l = a, ((o = i) != o ? l == l : o !== l || o && typeof o == "object" || typeof o == "function") && (i = a, t)) { + function i(a) { + if (l = a, ((o = r) != o ? l == l : o !== l || o && typeof o == "object" || typeof o == "function") && (r = a, t)) { const u = !As.length; - for (const c of n) c[1](), As.push(c, i); + for (const c of n) c[1](), As.push(c, r); if (u) { for (let c = 0; c < As.length; c += 2) As[c][0](As[c + 1]); As.length = 0; @@ -16774,29 +16774,29 @@ function no(i, e = Zr) { var o, l; } function s(a) { - r(a(i)); + i(a(r)); } - return { set: r, update: s, subscribe: function(a, o = Zr) { + return { set: i, update: s, subscribe: function(a, o = Zi) { const l = [a, o]; - return n.add(l), n.size === 1 && (t = e(r, s) || Zr), a(i), () => { + return n.add(l), n.size === 1 && (t = e(i, s) || Zi), a(r), () => { n.delete(l), n.size === 0 && t && (t(), t = null); }; } }; } -function ia(i, e, t) { - const n = !Array.isArray(i), r = n ? [i] : i; - if (!r.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); +function ra(r, e, t) { + const n = !Array.isArray(r), i = n ? [r] : r; + if (!i.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); const s = e.length < 2; return FE(t, (a, o) => { let l = !1; const u = []; - let c = 0, h = Zr; + let c = 0, h = Zi; const d = () => { if (c) return; h(); const m = e(n ? u[0] : u, a, o); - s ? a(m) : h = LE(m) ? m : Zr; - }, f = r.map((m, g) => RE(m, (p) => { + s ? a(m) : h = LE(m) ? m : Zi; + }, f = i.map((m, g) => RE(m, (p) => { u[g] = p, c &= ~(1 << g), l && d(); }, () => { c |= 1 << g; @@ -16806,191 +16806,191 @@ function ia(i, e, t) { }; }); } -function am(i) { - return Object.prototype.toString.call(i) === "[object Date]"; +function am(r) { + return Object.prototype.toString.call(r) === "[object Date]"; } -function bc(i, e, t, n) { +function bc(r, e, t, n) { if (typeof t == "number" || am(t)) { - const r = n - t, s = (t - e) / (i.dt || 1 / 60), a = (s + (i.opts.stiffness * r - i.opts.damping * s) * i.inv_mass) * i.dt; - return Math.abs(a) < i.opts.precision && Math.abs(r) < i.opts.precision ? n : (i.settled = !1, am(t) ? new Date(t.getTime() + a) : t + a); + const i = n - t, s = (t - e) / (r.dt || 1 / 60), a = (s + (r.opts.stiffness * i - r.opts.damping * s) * r.inv_mass) * r.dt; + return Math.abs(a) < r.opts.precision && Math.abs(i) < r.opts.precision ? n : (r.settled = !1, am(t) ? new Date(t.getTime() + a) : t + a); } - if (Array.isArray(t)) return t.map((r, s) => bc(i, e[s], t[s], n[s])); + if (Array.isArray(t)) return t.map((i, s) => bc(r, e[s], t[s], n[s])); if (typeof t == "object") { - const r = {}; - for (const s in t) r[s] = bc(i, e[s], t[s], n[s]); - return r; + const i = {}; + for (const s in t) i[s] = bc(r, e[s], t[s], n[s]); + return i; } throw new Error(`Cannot spring ${typeof t} values`); } -function om(i, e = {}) { - const t = no(i), { stiffness: n = 0.15, damping: r = 0.8, precision: s = 0.01 } = e; - let a, o, l, u = i, c = i, h = 1, d = 0, f = !1; +function om(r, e = {}) { + const t = no(r), { stiffness: n = 0.15, damping: i = 0.8, precision: s = 0.01 } = e; + let a, o, l, u = r, c = r, h = 1, d = 0, f = !1; function m(p, b = {}) { c = p; const y = l = {}; - return i == null || b.hard || g.stiffness >= 1 && g.damping >= 1 ? (f = !0, a = sm(), u = p, t.set(i = c), Promise.resolve()) : (b.soft && (d = 1 / (60 * (b.soft === !0 ? 0.5 : +b.soft)), h = 0), o || (a = sm(), f = !1, o = CE((v) => { + return r == null || b.hard || g.stiffness >= 1 && g.damping >= 1 ? (f = !0, a = sm(), u = p, t.set(r = c), Promise.resolve()) : (b.soft && (d = 1 / (60 * (b.soft === !0 ? 0.5 : +b.soft)), h = 0), o || (a = sm(), f = !1, o = CE((v) => { if (f) return f = !1, o = null, !1; h = Math.min(h + d, 1); - const T = { inv_mass: h, opts: g, settled: !0, dt: 60 * (v - a) / 1e3 }, A = bc(T, u, i, c); - return a = v, u = i, t.set(i = A), T.settled && (o = null), !T.settled; + const T = { inv_mass: h, opts: g, settled: !0, dt: 60 * (v - a) / 1e3 }, A = bc(T, u, r, c); + return a = v, u = r, t.set(r = A), T.settled && (o = null), !T.settled; })), new Promise((v) => { o.promise.then(() => { y === l && v(); }); })); } - const g = { set: m, update: (p, b) => m(p(c, i), b), subscribe: t.subscribe, stiffness: n, damping: r, precision: s }; + const g = { set: m, update: (p, b) => m(p(c, r), b), subscribe: t.subscribe, stiffness: n, damping: i, precision: s }; return g; } -function PE(i) { - return ME(i) && !OE(i); +function PE(r) { + return ME(r) && !OE(r); } -function ME(i) { - return !!i && typeof i == "object"; +function ME(r) { + return !!r && typeof r == "object"; } -function OE(i) { - var e = Object.prototype.toString.call(i); - return e === "[object RegExp]" || e === "[object Date]" || $E(i); +function OE(r) { + var e = Object.prototype.toString.call(r); + return e === "[object RegExp]" || e === "[object Date]" || $E(r); } var BE = typeof Symbol == "function" && Symbol.for, NE = BE ? Symbol.for("react.element") : 60103; -function $E(i) { - return i.$$typeof === NE; +function $E(r) { + return r.$$typeof === NE; } var UE = PE; -function HE(i) { - return Array.isArray(i) ? [] : {}; +function HE(r) { + return Array.isArray(r) ? [] : {}; } -function Ga(i, e) { - return e.clone !== !1 && e.isMergeableObject(i) ? Vs(HE(i), i, e) : i; +function Ga(r, e) { + return e.clone !== !1 && e.isMergeableObject(r) ? Vs(HE(r), r, e) : r; } -function GE(i, e, t) { - return i.concat(e).map(function(n) { +function GE(r, e, t) { + return r.concat(e).map(function(n) { return Ga(n, t); }); } -function zE(i, e) { +function zE(r, e) { if (!e.customMerge) return Vs; - var t = e.customMerge(i); + var t = e.customMerge(r); return typeof t == "function" ? t : Vs; } -function qE(i) { - return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(e) { - return Object.propertyIsEnumerable.call(i, e); +function qE(r) { + return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(r).filter(function(e) { + return Object.propertyIsEnumerable.call(r, e); }) : []; } -function lm(i) { - return Object.keys(i).concat(qE(i)); +function lm(r) { + return Object.keys(r).concat(qE(r)); } -function O_(i, e) { +function O_(r, e) { try { - return e in i; + return e in r; } catch { return !1; } } -function VE(i, e) { - return O_(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e)); +function VE(r, e) { + return O_(r, e) && !(Object.hasOwnProperty.call(r, e) && Object.propertyIsEnumerable.call(r, e)); } -function KE(i, e, t) { +function KE(r, e, t) { var n = {}; - return t.isMergeableObject(i) && lm(i).forEach(function(r) { - n[r] = Ga(i[r], t); - }), lm(e).forEach(function(r) { - VE(i, r) || (O_(i, r) && t.isMergeableObject(e[r]) ? n[r] = zE(r, t)(i[r], e[r], t) : n[r] = Ga(e[r], t)); + return t.isMergeableObject(r) && lm(r).forEach(function(i) { + n[i] = Ga(r[i], t); + }), lm(e).forEach(function(i) { + VE(r, i) || (O_(r, i) && t.isMergeableObject(e[i]) ? n[i] = zE(i, t)(r[i], e[i], t) : n[i] = Ga(e[i], t)); }), n; } -function Vs(i, e, t) { +function Vs(r, e, t) { t = t || {}, t.arrayMerge = t.arrayMerge || GE, t.isMergeableObject = t.isMergeableObject || UE, t.cloneUnlessOtherwiseSpecified = Ga; - var n = Array.isArray(e), r = Array.isArray(i), s = n === r; - return s ? n ? t.arrayMerge(i, e, t) : KE(i, e, t) : Ga(e, t); + var n = Array.isArray(e), i = Array.isArray(r), s = n === i; + return s ? n ? t.arrayMerge(r, e, t) : KE(r, e, t) : Ga(e, t); } Vs.all = function(e, t) { if (!Array.isArray(e)) throw new Error("first argument should be an array"); - return e.reduce(function(n, r) { - return Vs(n, r, t); + return e.reduce(function(n, i) { + return Vs(n, i, t); }, {}); }; -var Ec = function(i, e) { +var Ec = function(r, e) { return Ec = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) { t.__proto__ = n; } || function(t, n) { - for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]); - }, Ec(i, e); + for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); + }, Ec(r, e); }; -function v0(i, e) { +function v0(r, e) { if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); - Ec(i, e); + Ec(r, e); function t() { - this.constructor = i; + this.constructor = r; } - i.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); + r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); } var Ve = function() { return Ve = Object.assign || function(e) { - for (var t, n = 1, r = arguments.length; n < r; n++) { + for (var t, n = 1, i = arguments.length; n < i; n++) { t = arguments[n]; for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]); } return e; }, Ve.apply(this, arguments); }; -function Eu(i, e, t) { - if (t || arguments.length === 2) for (var n = 0, r = e.length, s; n < r; n++) +function Eu(r, e, t) { + if (t || arguments.length === 2) for (var n = 0, i = e.length, s; n < i; n++) (s || !(n in e)) && (s || (s = Array.prototype.slice.call(e, 0, n)), s[n] = e[n]); - return i.concat(s || Array.prototype.slice.call(e)); + return r.concat(s || Array.prototype.slice.call(e)); } var Ne; -(function(i) { - i[i.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", i[i.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", i[i.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", i[i.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", i[i.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", i[i.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", i[i.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", i[i.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", i[i.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", i[i.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", i[i.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", i[i.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", i[i.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", i[i.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", i[i.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", i[i.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", i[i.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", i[i.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", i[i.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", i[i.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", i[i.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", i[i.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", i[i.INVALID_TAG = 23] = "INVALID_TAG", i[i.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", i[i.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", i[i.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; +(function(r) { + r[r.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", r[r.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", r[r.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", r[r.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", r[r.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", r[r.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", r[r.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", r[r.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", r[r.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", r[r.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", r[r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", r[r.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", r[r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", r[r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", r[r.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", r[r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", r[r.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", r[r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", r[r.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", r[r.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", r[r.INVALID_TAG = 23] = "INVALID_TAG", r[r.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", r[r.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", r[r.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; })(Ne || (Ne = {})); var st; -(function(i) { - i[i.literal = 0] = "literal", i[i.argument = 1] = "argument", i[i.number = 2] = "number", i[i.date = 3] = "date", i[i.time = 4] = "time", i[i.select = 5] = "select", i[i.plural = 6] = "plural", i[i.pound = 7] = "pound", i[i.tag = 8] = "tag"; +(function(r) { + r[r.literal = 0] = "literal", r[r.argument = 1] = "argument", r[r.number = 2] = "number", r[r.date = 3] = "date", r[r.time = 4] = "time", r[r.select = 5] = "select", r[r.plural = 6] = "plural", r[r.pound = 7] = "pound", r[r.tag = 8] = "tag"; })(st || (st = {})); var Ks; -(function(i) { - i[i.number = 0] = "number", i[i.dateTime = 1] = "dateTime"; +(function(r) { + r[r.number = 0] = "number", r[r.dateTime = 1] = "dateTime"; })(Ks || (Ks = {})); -function um(i) { - return i.type === st.literal; +function um(r) { + return r.type === st.literal; } -function jE(i) { - return i.type === st.argument; +function jE(r) { + return r.type === st.argument; } -function B_(i) { - return i.type === st.number; +function B_(r) { + return r.type === st.number; } -function N_(i) { - return i.type === st.date; +function N_(r) { + return r.type === st.date; } -function $_(i) { - return i.type === st.time; +function $_(r) { + return r.type === st.time; } -function U_(i) { - return i.type === st.select; +function U_(r) { + return r.type === st.select; } -function H_(i) { - return i.type === st.plural; +function H_(r) { + return r.type === st.plural; } -function WE(i) { - return i.type === st.pound; +function WE(r) { + return r.type === st.pound; } -function G_(i) { - return i.type === st.tag; +function G_(r) { + return r.type === st.tag; } -function z_(i) { - return !!(i && typeof i == "object" && i.type === Ks.number); +function z_(r) { + return !!(r && typeof r == "object" && r.type === Ks.number); } -function Sc(i) { - return !!(i && typeof i == "object" && i.type === Ks.dateTime); +function Sc(r) { + return !!(r && typeof r == "object" && r.type === Ks.dateTime); } var q_ = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, YE = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; -function XE(i) { +function XE(r) { var e = {}; - return i.replace(YE, function(t) { + return r.replace(YE, function(t) { var n = t.length; switch (t[0]) { case "G": @@ -17080,13 +17080,13 @@ function XE(i) { }), e; } var QE = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; -function ZE(i) { - if (i.length === 0) +function ZE(r) { + if (r.length === 0) throw new Error("Number skeleton cannot be empty"); - for (var e = i.split(QE).filter(function(d) { + for (var e = r.split(QE).filter(function(d) { return d.length > 0; - }), t = [], n = 0, r = e; n < r.length; n++) { - var s = r[n], a = s.split("/"); + }), t = [], n = 0, i = e; n < i.length; n++) { + var s = i[n], a = s.split("/"); if (a.length === 0) throw new Error("Invalid number skeleton"); for (var o = a[0], l = a.slice(1), u = 0, c = l; u < c.length; u++) { @@ -17098,18 +17098,18 @@ function ZE(i) { } return t; } -function JE(i) { - return i.replace(/^(.*?)-/, ""); +function JE(r) { + return r.replace(/^(.*?)-/, ""); } var cm = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, V_ = /^(@+)?(\+|#+)?[rs]?$/g, e7 = /(\*)(0+)|(#+)(0+)|(0+)/g, K_ = /^(0+)$/; -function hm(i) { +function hm(r) { var e = {}; - return i[i.length - 1] === "r" ? e.roundingPriority = "morePrecision" : i[i.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), i.replace(V_, function(t, n, r) { - return typeof r != "string" ? (e.minimumSignificantDigits = n.length, e.maximumSignificantDigits = n.length) : r === "+" ? e.minimumSignificantDigits = n.length : n[0] === "#" ? e.maximumSignificantDigits = n.length : (e.minimumSignificantDigits = n.length, e.maximumSignificantDigits = n.length + (typeof r == "string" ? r.length : 0)), ""; + return r[r.length - 1] === "r" ? e.roundingPriority = "morePrecision" : r[r.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), r.replace(V_, function(t, n, i) { + return typeof i != "string" ? (e.minimumSignificantDigits = n.length, e.maximumSignificantDigits = n.length) : i === "+" ? e.minimumSignificantDigits = n.length : n[0] === "#" ? e.maximumSignificantDigits = n.length : (e.minimumSignificantDigits = n.length, e.maximumSignificantDigits = n.length + (typeof i == "string" ? i.length : 0)), ""; }), e; } -function j_(i) { - switch (i) { +function j_(r) { + switch (r) { case "sign-auto": return { signDisplay: "auto" @@ -17148,28 +17148,28 @@ function j_(i) { }; } } -function t7(i) { +function t7(r) { var e; - if (i[0] === "E" && i[1] === "E" ? (e = { + if (r[0] === "E" && r[1] === "E" ? (e = { notation: "engineering" - }, i = i.slice(2)) : i[0] === "E" && (e = { + }, r = r.slice(2)) : r[0] === "E" && (e = { notation: "scientific" - }, i = i.slice(1)), e) { - var t = i.slice(0, 2); - if (t === "+!" ? (e.signDisplay = "always", i = i.slice(2)) : t === "+?" && (e.signDisplay = "exceptZero", i = i.slice(2)), !K_.test(i)) + }, r = r.slice(1)), e) { + var t = r.slice(0, 2); + if (t === "+!" ? (e.signDisplay = "always", r = r.slice(2)) : t === "+?" && (e.signDisplay = "exceptZero", r = r.slice(2)), !K_.test(r)) throw new Error("Malformed concise eng/scientific notation"); - e.minimumIntegerDigits = i.length; + e.minimumIntegerDigits = r.length; } return e; } -function dm(i) { - var e = {}, t = j_(i); +function dm(r) { + var e = {}, t = j_(r); return t || e; } -function n7(i) { - for (var e = {}, t = 0, n = i; t < n.length; t++) { - var r = n[t]; - switch (r.stem) { +function n7(r) { + for (var e = {}, t = 0, n = r; t < n.length; t++) { + var i = n[t]; + switch (i.stem) { case "percent": case "%": e.style = "percent"; @@ -17178,7 +17178,7 @@ function n7(i) { e.style = "percent", e.scale = 100; continue; case "currency": - e.style = "currency", e.currency = r.options[0]; + e.style = "currency", e.currency = i.options[0]; continue; case "group-off": case ",_": @@ -17190,7 +17190,7 @@ function n7(i) { continue; case "measure-unit": case "unit": - e.style = "unit", e.unit = JE(r.options[0]); + e.style = "unit", e.unit = JE(i.options[0]); continue; case "compact-short": case "K": @@ -17201,12 +17201,12 @@ function n7(i) { e.notation = "compact", e.compactDisplay = "long"; continue; case "scientific": - e = Ve(Ve(Ve({}, e), { notation: "scientific" }), r.options.reduce(function(l, u) { + e = Ve(Ve(Ve({}, e), { notation: "scientific" }), i.options.reduce(function(l, u) { return Ve(Ve({}, l), dm(u)); }, {})); continue; case "engineering": - e = Ve(Ve(Ve({}, e), { notation: "engineering" }), r.options.reduce(function(l, u) { + e = Ve(Ve(Ve({}, e), { notation: "engineering" }), i.options.reduce(function(l, u) { return Ve(Ve({}, l), dm(u)); }, {})); continue; @@ -17226,12 +17226,12 @@ function n7(i) { e.currencyDisplay = "symbol"; continue; case "scale": - e.scale = parseFloat(r.options[0]); + e.scale = parseFloat(i.options[0]); continue; case "integer-width": - if (r.options.length > 1) + if (i.options.length > 1) throw new RangeError("integer-width stems only accept a single optional option"); - r.options[0].replace(e7, function(l, u, c, h, d, f) { + i.options[0].replace(e7, function(l, u, c, h, d, f) { if (u) e.minimumIntegerDigits = c.length; else { @@ -17244,27 +17244,27 @@ function n7(i) { }); continue; } - if (K_.test(r.stem)) { - e.minimumIntegerDigits = r.stem.length; + if (K_.test(i.stem)) { + e.minimumIntegerDigits = i.stem.length; continue; } - if (cm.test(r.stem)) { - if (r.options.length > 1) + if (cm.test(i.stem)) { + if (i.options.length > 1) throw new RangeError("Fraction-precision stems only accept a single optional option"); - r.stem.replace(cm, function(l, u, c, h, d, f) { + i.stem.replace(cm, function(l, u, c, h, d, f) { return c === "*" ? e.minimumFractionDigits = u.length : h && h[0] === "#" ? e.maximumFractionDigits = h.length : d && f ? (e.minimumFractionDigits = d.length, e.maximumFractionDigits = d.length + f.length) : (e.minimumFractionDigits = u.length, e.maximumFractionDigits = u.length), ""; }); - var s = r.options[0]; + var s = i.options[0]; s === "w" ? e = Ve(Ve({}, e), { trailingZeroDisplay: "stripIfInteger" }) : s && (e = Ve(Ve({}, e), hm(s))); continue; } - if (V_.test(r.stem)) { - e = Ve(Ve({}, e), hm(r.stem)); + if (V_.test(i.stem)) { + e = Ve(Ve({}, e), hm(i.stem)); continue; } - var a = j_(r.stem); + var a = j_(i.stem); a && (e = Ve(Ve({}, e), a)); - var o = t7(r.stem); + var o = t7(i.stem); o && (e = Ve(Ve({}, e), o)); } return e; @@ -18606,26 +18606,26 @@ var Po = { "h" ] }; -function i7(i, e) { - for (var t = "", n = 0; n < i.length; n++) { - var r = i.charAt(n); - if (r === "j") { - for (var s = 0; n + 1 < i.length && i.charAt(n + 1) === r; ) +function r7(r, e) { + for (var t = "", n = 0; n < r.length; n++) { + var i = r.charAt(n); + if (i === "j") { + for (var s = 0; n + 1 < r.length && r.charAt(n + 1) === i; ) s++, n++; - var a = 1 + (s & 1), o = s < 2 ? 1 : 3 + (s >> 1), l = "a", u = r7(e); + var a = 1 + (s & 1), o = s < 2 ? 1 : 3 + (s >> 1), l = "a", u = i7(e); for ((u == "H" || u == "k") && (o = 0); o-- > 0; ) t += l; for (; a-- > 0; ) t = u + t; - } else r === "J" ? t += "H" : t += r; + } else i === "J" ? t += "H" : t += i; } return t; } -function r7(i) { - var e = i.hourCycle; +function i7(r) { + var e = r.hourCycle; if (e === void 0 && // @ts-ignore hourCycle(s) is not identified yet - i.hourCycles && // @ts-ignore - i.hourCycles.length && (e = i.hourCycles[0]), e) + r.hourCycles && // @ts-ignore + r.hourCycles.length && (e = r.hourCycles[0]), e) switch (e) { case "h24": return "k"; @@ -18638,17 +18638,17 @@ function r7(i) { default: throw new Error("Invalid hourCycle"); } - var t = i.language, n; - t !== "root" && (n = i.maximize().region); - var r = Po[n || ""] || Po[t || ""] || Po["".concat(t, "-001")] || Po["001"]; - return r[0]; + var t = r.language, n; + t !== "root" && (n = r.maximize().region); + var i = Po[n || ""] || Po[t || ""] || Po["".concat(t, "-001")] || Po["001"]; + return i[0]; } var Su, s7 = new RegExp("^".concat(q_.source, "*")), a7 = new RegExp("".concat(q_.source, "*$")); -function $e(i, e) { - return { start: i, end: e }; +function $e(r, e) { + return { start: r, end: e }; } -var o7 = !!String.prototype.startsWith, l7 = !!String.fromCodePoint, u7 = !!Object.fromEntries, c7 = !!String.prototype.codePointAt, h7 = !!String.prototype.trimStart, d7 = !!String.prototype.trimEnd, f7 = !!Number.isSafeInteger, m7 = f7 ? Number.isSafeInteger : function(i) { - return typeof i == "number" && isFinite(i) && Math.floor(i) === i && Math.abs(i) <= 9007199254740991; +var o7 = !!String.prototype.startsWith, l7 = !!String.fromCodePoint, u7 = !!Object.fromEntries, c7 = !!String.prototype.codePointAt, h7 = !!String.prototype.trimStart, d7 = !!String.prototype.trimEnd, f7 = !!Number.isSafeInteger, m7 = f7 ? Number.isSafeInteger : function(r) { + return typeof r == "number" && isFinite(r) && Math.floor(r) === r && Math.abs(r) <= 9007199254740991; }, Tc = !0; try { var g7 = Y_("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); @@ -18671,7 +18671,7 @@ var fm = o7 ? ( function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; - for (var n = "", r = e.length, s = 0, a; r > s; ) { + for (var n = "", i = e.length, s = 0, a; i > s; ) { if (a = e[s++], a > 1114111) throw RangeError(a + " is not a valid code point"); n += a < 65536 ? String.fromCharCode(a) : String.fromCharCode(((a -= 65536) >> 10) + 55296, a % 1024 + 56320); @@ -18683,8 +18683,8 @@ var fm = o7 ? ( u7 ? Object.fromEntries : ( // Ponyfill function(e) { - for (var t = {}, n = 0, r = e; n < r.length; n++) { - var s = r[n], a = s[0], o = s[1]; + for (var t = {}, n = 0, i = e; n < i.length; n++) { + var s = i[n], a = s[0], o = s[1]; t[a] = o; } return t; @@ -18700,8 +18700,8 @@ var fm = o7 ? ( function(e, t) { var n = e.length; if (!(t < 0 || t >= n)) { - var r = e.charCodeAt(t), s; - return r < 55296 || r > 56319 || t + 1 === n || (s = e.charCodeAt(t + 1)) < 56320 || s > 57343 ? r : (r - 55296 << 10) + (s - 56320) + 65536; + var i = e.charCodeAt(t), s; + return i < 55296 || i > 56319 || t + 1 === n || (s = e.charCodeAt(t + 1)) < 56320 || s > 57343 ? i : (i - 55296 << 10) + (s - 56320) + 65536; } } ), p7 = h7 ? ( @@ -18725,8 +18725,8 @@ var fm = o7 ? ( return e.replace(a7, ""); } ); -function Y_(i, e) { - return new RegExp(i, e); +function Y_(r, e) { + return new RegExp(r, e); } var xc; if (Tc) { @@ -18734,43 +18734,43 @@ if (Tc) { xc = function(e, t) { var n; gm.lastIndex = t; - var r = gm.exec(e); - return (n = r[1]) !== null && n !== void 0 ? n : ""; + var i = gm.exec(e); + return (n = i[1]) !== null && n !== void 0 ? n : ""; }; } else xc = function(e, t) { for (var n = []; ; ) { - var r = W_(e, t); - if (r === void 0 || X_(r) || E7(r)) + var i = W_(e, t); + if (i === void 0 || X_(i) || E7(i)) break; - n.push(r), t += r >= 65536 ? 2 : 1; + n.push(i), t += i >= 65536 ? 2 : 1; } return Ac.apply(void 0, n); }; var v7 = ( /** @class */ function() { - function i(e, t) { + function r(e, t) { t === void 0 && (t = {}), this.message = e, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t.ignoreTag, this.locale = t.locale, this.requiresOtherClause = !!t.requiresOtherClause, this.shouldParseSkeletons = !!t.shouldParseSkeletons; } - return i.prototype.parse = function() { + return r.prototype.parse = function() { if (this.offset() !== 0) throw Error("parser can only be used once"); return this.parseMessage(0, "", !1); - }, i.prototype.parseMessage = function(e, t, n) { - for (var r = []; !this.isEOF(); ) { + }, r.prototype.parseMessage = function(e, t, n) { + for (var i = []; !this.isEOF(); ) { var s = this.char(); if (s === 123) { var a = this.parseArgument(e, n); if (a.err) return a; - r.push(a.val); + i.push(a.val); } else { if (s === 125 && e > 0) break; if (s === 35 && (t === "plural" || t === "selectordinal")) { var o = this.clonePosition(); - this.bump(), r.push({ + this.bump(), i.push({ type: st.pound, location: $e(o, this.clonePosition()) }); @@ -18782,25 +18782,25 @@ var v7 = ( var a = this.parseTag(e, t); if (a.err) return a; - r.push(a.val); + i.push(a.val); } else { var a = this.parseLiteral(e, t); if (a.err) return a; - r.push(a.val); + i.push(a.val); } } } - return { val: r, err: null }; - }, i.prototype.parseTag = function(e, t) { + return { val: i, err: null }; + }, r.prototype.parseTag = function(e, t) { var n = this.clonePosition(); this.bump(); - var r = this.parseTagName(); + var i = this.parseTagName(); if (this.bumpSpace(), this.bumpIf("/>")) return { val: { type: st.literal, - value: "<".concat(r, "/>"), + value: "<".concat(i, "/>"), location: $e(n, this.clonePosition()) }, err: null @@ -18814,10 +18814,10 @@ var v7 = ( if (this.isEOF() || !wc(this.char())) return this.error(Ne.INVALID_TAG, $e(o, this.clonePosition())); var l = this.clonePosition(), u = this.parseTagName(); - return r !== u ? this.error(Ne.UNMATCHED_CLOSING_TAG, $e(l, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { + return i !== u ? this.error(Ne.UNMATCHED_CLOSING_TAG, $e(l, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { val: { type: st.tag, - value: r, + value: i, children: a, location: $e(n, this.clonePosition()) }, @@ -18827,39 +18827,39 @@ var v7 = ( return this.error(Ne.UNCLOSED_TAG, $e(n, this.clonePosition())); } else return this.error(Ne.INVALID_TAG, $e(n, this.clonePosition())); - }, i.prototype.parseTagName = function() { + }, r.prototype.parseTagName = function() { var e = this.offset(); for (this.bump(); !this.isEOF() && b7(this.char()); ) this.bump(); return this.message.slice(e, this.offset()); - }, i.prototype.parseLiteral = function(e, t) { - for (var n = this.clonePosition(), r = ""; ; ) { + }, r.prototype.parseLiteral = function(e, t) { + for (var n = this.clonePosition(), i = ""; ; ) { var s = this.tryParseQuote(t); if (s) { - r += s; + i += s; continue; } var a = this.tryParseUnquoted(e, t); if (a) { - r += a; + i += a; continue; } var o = this.tryParseLeftAngleBracket(); if (o) { - r += o; + i += o; continue; } break; } var l = $e(n, this.clonePosition()); return { - val: { type: st.literal, value: r, location: l }, + val: { type: st.literal, value: i, location: l }, err: null }; - }, i.prototype.tryParseLeftAngleBracket = function() { + }, r.prototype.tryParseLeftAngleBracket = function() { return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail. !y7(this.peek() || 0)) ? (this.bump(), "<") : null; - }, i.prototype.tryParseQuote = function(e) { + }, r.prototype.tryParseQuote = function(e) { if (this.isEOF() || this.char() !== 39) return null; switch (this.peek()) { @@ -18893,19 +18893,19 @@ var v7 = ( this.bump(); } return Ac.apply(void 0, t); - }, i.prototype.tryParseUnquoted = function(e, t) { + }, r.prototype.tryParseUnquoted = function(e, t) { if (this.isEOF()) return null; var n = this.char(); return n === 60 || n === 123 || n === 35 && (t === "plural" || t === "selectordinal") || n === 125 && e > 0 ? null : (this.bump(), Ac(n)); - }, i.prototype.parseArgument = function(e, t) { + }, r.prototype.parseArgument = function(e, t) { var n = this.clonePosition(); if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(Ne.EXPECT_ARGUMENT_CLOSING_BRACE, $e(n, this.clonePosition())); if (this.char() === 125) return this.bump(), this.error(Ne.EMPTY_ARGUMENT, $e(n, this.clonePosition())); - var r = this.parseIdentifierIfPossible().value; - if (!r) + var i = this.parseIdentifierIfPossible().value; + if (!i) return this.error(Ne.MALFORMED_ARGUMENT, $e(n, this.clonePosition())); if (this.bumpSpace(), this.isEOF()) return this.error(Ne.EXPECT_ARGUMENT_CLOSING_BRACE, $e(n, this.clonePosition())); @@ -18915,22 +18915,22 @@ var v7 = ( val: { type: st.argument, // value does not include the opening and closing braces. - value: r, + value: i, location: $e(n, this.clonePosition()) }, err: null }; case 44: - return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(Ne.EXPECT_ARGUMENT_CLOSING_BRACE, $e(n, this.clonePosition())) : this.parseArgumentOptions(e, t, r, n); + return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(Ne.EXPECT_ARGUMENT_CLOSING_BRACE, $e(n, this.clonePosition())) : this.parseArgumentOptions(e, t, i, n); default: return this.error(Ne.MALFORMED_ARGUMENT, $e(n, this.clonePosition())); } - }, i.prototype.parseIdentifierIfPossible = function() { - var e = this.clonePosition(), t = this.offset(), n = xc(this.message, t), r = t + n.length; - this.bumpTo(r); + }, r.prototype.parseIdentifierIfPossible = function() { + var e = this.clonePosition(), t = this.offset(), n = xc(this.message, t), i = t + n.length; + this.bumpTo(i); var s = this.clonePosition(), a = $e(e, s); return { value: n, location: a }; - }, i.prototype.parseArgumentOptions = function(e, t, n, r) { + }, r.prototype.parseArgumentOptions = function(e, t, n, i) { var s, a = this.clonePosition(), o = this.parseIdentifierIfPossible().value, l = this.clonePosition(); switch (o) { case "": @@ -18951,10 +18951,10 @@ var v7 = ( var f = $e(c, this.clonePosition()); u = { style: d, styleLocation: f }; } - var m = this.tryParseArgumentClose(r); + var m = this.tryParseArgumentClose(i); if (m.err) return m; - var g = $e(r, this.clonePosition()); + var g = $e(i, this.clonePosition()); if (u && fm(u == null ? void 0 : u.style, "::", 0)) { var p = p7(u.style.slice(2)); if (o === "number") { @@ -18967,7 +18967,7 @@ var v7 = ( if (p.length === 0) return this.error(Ne.EXPECT_DATE_TIME_SKELETON, g); var b = p; - this.locale && (b = i7(p, this.locale)); + this.locale && (b = r7(p, this.locale)); var d = { type: Ks.dateTime, pattern: b, @@ -19010,10 +19010,10 @@ var v7 = ( var w = this.tryParsePluralOrSelectOptions(e, o, t, T); if (w.err) return w; - var m = this.tryParseArgumentClose(r); + var m = this.tryParseArgumentClose(i); if (m.err) return m; - var D = $e(r, this.clonePosition()); + var D = $e(i, this.clonePosition()); return o === "select" ? { val: { type: st.select, @@ -19037,17 +19037,17 @@ var v7 = ( default: return this.error(Ne.INVALID_ARGUMENT_TYPE, $e(a, l)); } - }, i.prototype.tryParseArgumentClose = function(e) { + }, r.prototype.tryParseArgumentClose = function(e) { return this.isEOF() || this.char() !== 125 ? this.error(Ne.EXPECT_ARGUMENT_CLOSING_BRACE, $e(e, this.clonePosition())) : (this.bump(), { val: !0, err: null }); - }, i.prototype.parseSimpleArgStyleIfPossible = function() { + }, r.prototype.parseSimpleArgStyleIfPossible = function() { for (var e = 0, t = this.clonePosition(); !this.isEOF(); ) { var n = this.char(); switch (n) { case 39: { this.bump(); - var r = this.clonePosition(); + var i = this.clonePosition(); if (!this.bumpUntil("'")) - return this.error(Ne.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, $e(r, this.clonePosition())); + return this.error(Ne.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, $e(i, this.clonePosition())); this.bump(); break; } @@ -19074,7 +19074,7 @@ var v7 = ( val: this.message.slice(t.offset, this.offset()), err: null }; - }, i.prototype.parseNumberSkeletonFromString = function(e, t) { + }, r.prototype.parseNumberSkeletonFromString = function(e, t) { var n = []; try { n = ZE(e); @@ -19090,8 +19090,8 @@ var v7 = ( }, err: null }; - }, i.prototype.tryParsePluralOrSelectOptions = function(e, t, n, r) { - for (var s, a = !1, o = [], l = /* @__PURE__ */ new Set(), u = r.value, c = r.location; ; ) { + }, r.prototype.tryParsePluralOrSelectOptions = function(e, t, n, i) { + for (var s, a = !1, o = [], l = /* @__PURE__ */ new Set(), u = i.value, c = i.location; ; ) { if (u.length === 0) { var h = this.clonePosition(); if (t !== "select" && this.bumpIf("=")) { @@ -19123,8 +19123,8 @@ var v7 = ( ]), l.add(u), this.bumpSpace(), s = this.parseIdentifierIfPossible(), u = s.value, c = s.location; } return o.length === 0 ? this.error(t === "select" ? Ne.EXPECT_SELECT_ARGUMENT_SELECTOR : Ne.EXPECT_PLURAL_ARGUMENT_SELECTOR, $e(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !a ? this.error(Ne.MISSING_OTHER_CLAUSE, $e(this.clonePosition(), this.clonePosition())) : { val: o, err: null }; - }, i.prototype.tryParseDecimalInteger = function(e, t) { - var n = 1, r = this.clonePosition(); + }, r.prototype.tryParseDecimalInteger = function(e, t) { + var n = 1, i = this.clonePosition(); this.bumpIf("+") || this.bumpIf("-") && (n = -1); for (var s = !1, a = 0; !this.isEOF(); ) { var o = this.char(); @@ -19133,19 +19133,19 @@ var v7 = ( else break; } - var l = $e(r, this.clonePosition()); + var l = $e(i, this.clonePosition()); return s ? (a *= n, m7(a) ? { val: a, err: null } : this.error(t, l)) : this.error(e, l); - }, i.prototype.offset = function() { + }, r.prototype.offset = function() { return this.position.offset; - }, i.prototype.isEOF = function() { + }, r.prototype.isEOF = function() { return this.offset() === this.message.length; - }, i.prototype.clonePosition = function() { + }, r.prototype.clonePosition = function() { return { offset: this.position.offset, line: this.position.line, column: this.position.column }; - }, i.prototype.char = function() { + }, r.prototype.char = function() { var e = this.position.offset; if (e >= this.message.length) throw Error("out of bound"); @@ -19153,7 +19153,7 @@ var v7 = ( if (t === void 0) throw Error("Offset ".concat(e, " is at invalid UTF-16 code unit boundary")); return t; - }, i.prototype.error = function(e, t) { + }, r.prototype.error = function(e, t) { return { val: null, err: { @@ -19162,22 +19162,22 @@ var v7 = ( location: t } }; - }, i.prototype.bump = function() { + }, r.prototype.bump = function() { if (!this.isEOF()) { var e = this.char(); e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2); } - }, i.prototype.bumpIf = function(e) { + }, r.prototype.bumpIf = function(e) { if (fm(this.message, e, this.offset())) { for (var t = 0; t < e.length; t++) this.bump(); return !0; } return !1; - }, i.prototype.bumpUntil = function(e) { + }, r.prototype.bumpUntil = function(e) { var t = this.offset(), n = this.message.indexOf(e, t); return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1); - }, i.prototype.bumpTo = function(e) { + }, r.prototype.bumpTo = function(e) { if (this.offset() > e) throw Error("targetOffset ".concat(e, " must be greater than or equal to the current offset ").concat(this.offset())); for (e = Math.min(e, this.message.length); ; ) { @@ -19189,76 +19189,76 @@ var v7 = ( if (this.bump(), this.isEOF()) break; } - }, i.prototype.bumpSpace = function() { + }, r.prototype.bumpSpace = function() { for (; !this.isEOF() && X_(this.char()); ) this.bump(); - }, i.prototype.peek = function() { + }, r.prototype.peek = function() { if (this.isEOF()) return null; var e = this.char(), t = this.offset(), n = this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)); return n ?? null; - }, i; + }, r; }() ); -function wc(i) { - return i >= 97 && i <= 122 || i >= 65 && i <= 90; +function wc(r) { + return r >= 97 && r <= 122 || r >= 65 && r <= 90; } -function y7(i) { - return wc(i) || i === 47; +function y7(r) { + return wc(r) || r === 47; } -function b7(i) { - return i === 45 || i === 46 || i >= 48 && i <= 57 || i === 95 || i >= 97 && i <= 122 || i >= 65 && i <= 90 || i == 183 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 893 || i >= 895 && i <= 8191 || i >= 8204 && i <= 8205 || i >= 8255 && i <= 8256 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039; +function b7(r) { + return r === 45 || r === 46 || r >= 48 && r <= 57 || r === 95 || r >= 97 && r <= 122 || r >= 65 && r <= 90 || r == 183 || r >= 192 && r <= 214 || r >= 216 && r <= 246 || r >= 248 && r <= 893 || r >= 895 && r <= 8191 || r >= 8204 && r <= 8205 || r >= 8255 && r <= 8256 || r >= 8304 && r <= 8591 || r >= 11264 && r <= 12271 || r >= 12289 && r <= 55295 || r >= 63744 && r <= 64975 || r >= 65008 && r <= 65533 || r >= 65536 && r <= 983039; } -function X_(i) { - return i >= 9 && i <= 13 || i === 32 || i === 133 || i >= 8206 && i <= 8207 || i === 8232 || i === 8233; +function X_(r) { + return r >= 9 && r <= 13 || r === 32 || r === 133 || r >= 8206 && r <= 8207 || r === 8232 || r === 8233; } -function E7(i) { - return i >= 33 && i <= 35 || i === 36 || i >= 37 && i <= 39 || i === 40 || i === 41 || i === 42 || i === 43 || i === 44 || i === 45 || i >= 46 && i <= 47 || i >= 58 && i <= 59 || i >= 60 && i <= 62 || i >= 63 && i <= 64 || i === 91 || i === 92 || i === 93 || i === 94 || i === 96 || i === 123 || i === 124 || i === 125 || i === 126 || i === 161 || i >= 162 && i <= 165 || i === 166 || i === 167 || i === 169 || i === 171 || i === 172 || i === 174 || i === 176 || i === 177 || i === 182 || i === 187 || i === 191 || i === 215 || i === 247 || i >= 8208 && i <= 8213 || i >= 8214 && i <= 8215 || i === 8216 || i === 8217 || i === 8218 || i >= 8219 && i <= 8220 || i === 8221 || i === 8222 || i === 8223 || i >= 8224 && i <= 8231 || i >= 8240 && i <= 8248 || i === 8249 || i === 8250 || i >= 8251 && i <= 8254 || i >= 8257 && i <= 8259 || i === 8260 || i === 8261 || i === 8262 || i >= 8263 && i <= 8273 || i === 8274 || i === 8275 || i >= 8277 && i <= 8286 || i >= 8592 && i <= 8596 || i >= 8597 && i <= 8601 || i >= 8602 && i <= 8603 || i >= 8604 && i <= 8607 || i === 8608 || i >= 8609 && i <= 8610 || i === 8611 || i >= 8612 && i <= 8613 || i === 8614 || i >= 8615 && i <= 8621 || i === 8622 || i >= 8623 && i <= 8653 || i >= 8654 && i <= 8655 || i >= 8656 && i <= 8657 || i === 8658 || i === 8659 || i === 8660 || i >= 8661 && i <= 8691 || i >= 8692 && i <= 8959 || i >= 8960 && i <= 8967 || i === 8968 || i === 8969 || i === 8970 || i === 8971 || i >= 8972 && i <= 8991 || i >= 8992 && i <= 8993 || i >= 8994 && i <= 9e3 || i === 9001 || i === 9002 || i >= 9003 && i <= 9083 || i === 9084 || i >= 9085 && i <= 9114 || i >= 9115 && i <= 9139 || i >= 9140 && i <= 9179 || i >= 9180 && i <= 9185 || i >= 9186 && i <= 9254 || i >= 9255 && i <= 9279 || i >= 9280 && i <= 9290 || i >= 9291 && i <= 9311 || i >= 9472 && i <= 9654 || i === 9655 || i >= 9656 && i <= 9664 || i === 9665 || i >= 9666 && i <= 9719 || i >= 9720 && i <= 9727 || i >= 9728 && i <= 9838 || i === 9839 || i >= 9840 && i <= 10087 || i === 10088 || i === 10089 || i === 10090 || i === 10091 || i === 10092 || i === 10093 || i === 10094 || i === 10095 || i === 10096 || i === 10097 || i === 10098 || i === 10099 || i === 10100 || i === 10101 || i >= 10132 && i <= 10175 || i >= 10176 && i <= 10180 || i === 10181 || i === 10182 || i >= 10183 && i <= 10213 || i === 10214 || i === 10215 || i === 10216 || i === 10217 || i === 10218 || i === 10219 || i === 10220 || i === 10221 || i === 10222 || i === 10223 || i >= 10224 && i <= 10239 || i >= 10240 && i <= 10495 || i >= 10496 && i <= 10626 || i === 10627 || i === 10628 || i === 10629 || i === 10630 || i === 10631 || i === 10632 || i === 10633 || i === 10634 || i === 10635 || i === 10636 || i === 10637 || i === 10638 || i === 10639 || i === 10640 || i === 10641 || i === 10642 || i === 10643 || i === 10644 || i === 10645 || i === 10646 || i === 10647 || i === 10648 || i >= 10649 && i <= 10711 || i === 10712 || i === 10713 || i === 10714 || i === 10715 || i >= 10716 && i <= 10747 || i === 10748 || i === 10749 || i >= 10750 && i <= 11007 || i >= 11008 && i <= 11055 || i >= 11056 && i <= 11076 || i >= 11077 && i <= 11078 || i >= 11079 && i <= 11084 || i >= 11085 && i <= 11123 || i >= 11124 && i <= 11125 || i >= 11126 && i <= 11157 || i === 11158 || i >= 11159 && i <= 11263 || i >= 11776 && i <= 11777 || i === 11778 || i === 11779 || i === 11780 || i === 11781 || i >= 11782 && i <= 11784 || i === 11785 || i === 11786 || i === 11787 || i === 11788 || i === 11789 || i >= 11790 && i <= 11798 || i === 11799 || i >= 11800 && i <= 11801 || i === 11802 || i === 11803 || i === 11804 || i === 11805 || i >= 11806 && i <= 11807 || i === 11808 || i === 11809 || i === 11810 || i === 11811 || i === 11812 || i === 11813 || i === 11814 || i === 11815 || i === 11816 || i === 11817 || i >= 11818 && i <= 11822 || i === 11823 || i >= 11824 && i <= 11833 || i >= 11834 && i <= 11835 || i >= 11836 && i <= 11839 || i === 11840 || i === 11841 || i === 11842 || i >= 11843 && i <= 11855 || i >= 11856 && i <= 11857 || i === 11858 || i >= 11859 && i <= 11903 || i >= 12289 && i <= 12291 || i === 12296 || i === 12297 || i === 12298 || i === 12299 || i === 12300 || i === 12301 || i === 12302 || i === 12303 || i === 12304 || i === 12305 || i >= 12306 && i <= 12307 || i === 12308 || i === 12309 || i === 12310 || i === 12311 || i === 12312 || i === 12313 || i === 12314 || i === 12315 || i === 12316 || i === 12317 || i >= 12318 && i <= 12319 || i === 12320 || i === 12336 || i === 64830 || i === 64831 || i >= 65093 && i <= 65094; +function E7(r) { + return r >= 33 && r <= 35 || r === 36 || r >= 37 && r <= 39 || r === 40 || r === 41 || r === 42 || r === 43 || r === 44 || r === 45 || r >= 46 && r <= 47 || r >= 58 && r <= 59 || r >= 60 && r <= 62 || r >= 63 && r <= 64 || r === 91 || r === 92 || r === 93 || r === 94 || r === 96 || r === 123 || r === 124 || r === 125 || r === 126 || r === 161 || r >= 162 && r <= 165 || r === 166 || r === 167 || r === 169 || r === 171 || r === 172 || r === 174 || r === 176 || r === 177 || r === 182 || r === 187 || r === 191 || r === 215 || r === 247 || r >= 8208 && r <= 8213 || r >= 8214 && r <= 8215 || r === 8216 || r === 8217 || r === 8218 || r >= 8219 && r <= 8220 || r === 8221 || r === 8222 || r === 8223 || r >= 8224 && r <= 8231 || r >= 8240 && r <= 8248 || r === 8249 || r === 8250 || r >= 8251 && r <= 8254 || r >= 8257 && r <= 8259 || r === 8260 || r === 8261 || r === 8262 || r >= 8263 && r <= 8273 || r === 8274 || r === 8275 || r >= 8277 && r <= 8286 || r >= 8592 && r <= 8596 || r >= 8597 && r <= 8601 || r >= 8602 && r <= 8603 || r >= 8604 && r <= 8607 || r === 8608 || r >= 8609 && r <= 8610 || r === 8611 || r >= 8612 && r <= 8613 || r === 8614 || r >= 8615 && r <= 8621 || r === 8622 || r >= 8623 && r <= 8653 || r >= 8654 && r <= 8655 || r >= 8656 && r <= 8657 || r === 8658 || r === 8659 || r === 8660 || r >= 8661 && r <= 8691 || r >= 8692 && r <= 8959 || r >= 8960 && r <= 8967 || r === 8968 || r === 8969 || r === 8970 || r === 8971 || r >= 8972 && r <= 8991 || r >= 8992 && r <= 8993 || r >= 8994 && r <= 9e3 || r === 9001 || r === 9002 || r >= 9003 && r <= 9083 || r === 9084 || r >= 9085 && r <= 9114 || r >= 9115 && r <= 9139 || r >= 9140 && r <= 9179 || r >= 9180 && r <= 9185 || r >= 9186 && r <= 9254 || r >= 9255 && r <= 9279 || r >= 9280 && r <= 9290 || r >= 9291 && r <= 9311 || r >= 9472 && r <= 9654 || r === 9655 || r >= 9656 && r <= 9664 || r === 9665 || r >= 9666 && r <= 9719 || r >= 9720 && r <= 9727 || r >= 9728 && r <= 9838 || r === 9839 || r >= 9840 && r <= 10087 || r === 10088 || r === 10089 || r === 10090 || r === 10091 || r === 10092 || r === 10093 || r === 10094 || r === 10095 || r === 10096 || r === 10097 || r === 10098 || r === 10099 || r === 10100 || r === 10101 || r >= 10132 && r <= 10175 || r >= 10176 && r <= 10180 || r === 10181 || r === 10182 || r >= 10183 && r <= 10213 || r === 10214 || r === 10215 || r === 10216 || r === 10217 || r === 10218 || r === 10219 || r === 10220 || r === 10221 || r === 10222 || r === 10223 || r >= 10224 && r <= 10239 || r >= 10240 && r <= 10495 || r >= 10496 && r <= 10626 || r === 10627 || r === 10628 || r === 10629 || r === 10630 || r === 10631 || r === 10632 || r === 10633 || r === 10634 || r === 10635 || r === 10636 || r === 10637 || r === 10638 || r === 10639 || r === 10640 || r === 10641 || r === 10642 || r === 10643 || r === 10644 || r === 10645 || r === 10646 || r === 10647 || r === 10648 || r >= 10649 && r <= 10711 || r === 10712 || r === 10713 || r === 10714 || r === 10715 || r >= 10716 && r <= 10747 || r === 10748 || r === 10749 || r >= 10750 && r <= 11007 || r >= 11008 && r <= 11055 || r >= 11056 && r <= 11076 || r >= 11077 && r <= 11078 || r >= 11079 && r <= 11084 || r >= 11085 && r <= 11123 || r >= 11124 && r <= 11125 || r >= 11126 && r <= 11157 || r === 11158 || r >= 11159 && r <= 11263 || r >= 11776 && r <= 11777 || r === 11778 || r === 11779 || r === 11780 || r === 11781 || r >= 11782 && r <= 11784 || r === 11785 || r === 11786 || r === 11787 || r === 11788 || r === 11789 || r >= 11790 && r <= 11798 || r === 11799 || r >= 11800 && r <= 11801 || r === 11802 || r === 11803 || r === 11804 || r === 11805 || r >= 11806 && r <= 11807 || r === 11808 || r === 11809 || r === 11810 || r === 11811 || r === 11812 || r === 11813 || r === 11814 || r === 11815 || r === 11816 || r === 11817 || r >= 11818 && r <= 11822 || r === 11823 || r >= 11824 && r <= 11833 || r >= 11834 && r <= 11835 || r >= 11836 && r <= 11839 || r === 11840 || r === 11841 || r === 11842 || r >= 11843 && r <= 11855 || r >= 11856 && r <= 11857 || r === 11858 || r >= 11859 && r <= 11903 || r >= 12289 && r <= 12291 || r === 12296 || r === 12297 || r === 12298 || r === 12299 || r === 12300 || r === 12301 || r === 12302 || r === 12303 || r === 12304 || r === 12305 || r >= 12306 && r <= 12307 || r === 12308 || r === 12309 || r === 12310 || r === 12311 || r === 12312 || r === 12313 || r === 12314 || r === 12315 || r === 12316 || r === 12317 || r >= 12318 && r <= 12319 || r === 12320 || r === 12336 || r === 64830 || r === 64831 || r >= 65093 && r <= 65094; } -function Dc(i) { - i.forEach(function(e) { +function Dc(r) { + r.forEach(function(e) { if (delete e.location, U_(e) || H_(e)) for (var t in e.options) delete e.options[t].location, Dc(e.options[t].value); else B_(e) && z_(e.style) || (N_(e) || $_(e)) && Sc(e.style) ? delete e.style.location : G_(e) && Dc(e.children); }); } -function S7(i, e) { +function S7(r, e) { e === void 0 && (e = {}), e = Ve({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, e); - var t = new v7(i, e).parse(); + var t = new v7(r, e).parse(); if (t.err) { var n = SyntaxError(Ne[t.err.kind]); throw n.location = t.err.location, n.originalMessage = t.err.message, n; } return e != null && e.captureLocation || Dc(t.val), t.val; } -function Tu(i, e) { - var t = e && e.cache ? e.cache : k7, n = e && e.serializer ? e.serializer : D7, r = e && e.strategy ? e.strategy : x7; - return r(i, { +function Tu(r, e) { + var t = e && e.cache ? e.cache : k7, n = e && e.serializer ? e.serializer : D7, i = e && e.strategy ? e.strategy : x7; + return i(r, { cache: t, serializer: n }); } -function T7(i) { - return i == null || typeof i == "number" || typeof i == "boolean"; +function T7(r) { + return r == null || typeof r == "number" || typeof r == "boolean"; } -function A7(i, e, t, n) { - var r = T7(n) ? n : t(n), s = e.get(r); - return typeof s > "u" && (s = i.call(this, n), e.set(r, s)), s; +function A7(r, e, t, n) { + var i = T7(n) ? n : t(n), s = e.get(i); + return typeof s > "u" && (s = r.call(this, n), e.set(i, s)), s; } -function Q_(i, e, t) { - var n = Array.prototype.slice.call(arguments, 3), r = t(n), s = e.get(r); - return typeof s > "u" && (s = i.apply(this, n), e.set(r, s)), s; +function Q_(r, e, t) { + var n = Array.prototype.slice.call(arguments, 3), i = t(n), s = e.get(i); + return typeof s > "u" && (s = r.apply(this, n), e.set(i, s)), s; } -function Z_(i, e, t, n, r) { - return t.bind(e, i, n, r); +function Z_(r, e, t, n, i) { + return t.bind(e, r, n, i); } -function x7(i, e) { - var t = i.length === 1 ? A7 : Q_; - return Z_(i, this, t, e.cache.create(), e.serializer); +function x7(r, e) { + var t = r.length === 1 ? A7 : Q_; + return Z_(r, this, t, e.cache.create(), e.serializer); } -function w7(i, e) { - return Z_(i, this, Q_, e.cache.create(), e.serializer); +function w7(r, e) { + return Z_(r, this, Q_, e.cache.create(), e.serializer); } var D7 = function() { return JSON.stringify(arguments); @@ -19266,11 +19266,11 @@ var D7 = function() { function Mh() { this.cache = /* @__PURE__ */ Object.create(null); } -Mh.prototype.get = function(i) { - return this.cache[i]; +Mh.prototype.get = function(r) { + return this.cache[r]; }; -Mh.prototype.set = function(i, e) { - this.cache[i] = e; +Mh.prototype.set = function(r, e) { + this.cache[r] = e; }; var k7 = { create: function() { @@ -19279,16 +19279,16 @@ var k7 = { }, Au = { variadic: w7 }, js; -(function(i) { - i.MISSING_VALUE = "MISSING_VALUE", i.INVALID_VALUE = "INVALID_VALUE", i.MISSING_INTL_API = "MISSING_INTL_API"; +(function(r) { + r.MISSING_VALUE = "MISSING_VALUE", r.INVALID_VALUE = "INVALID_VALUE", r.MISSING_INTL_API = "MISSING_INTL_API"; })(js || (js = {})); var y0 = ( /** @class */ - function(i) { - v0(e, i); - function e(t, n, r) { - var s = i.call(this, t) || this; - return s.code = n, s.originalMessage = r, s; + function(r) { + v0(e, r); + function e(t, n, i) { + var s = r.call(this, t) || this; + return s.code = n, s.originalMessage = i, s; } return e.prototype.toString = function() { return "[formatjs Error: ".concat(this.code, "] ").concat(this.message); @@ -19296,53 +19296,53 @@ var y0 = ( }(Error) ), pm = ( /** @class */ - function(i) { - v0(e, i); - function e(t, n, r, s) { - return i.call(this, 'Invalid values for "'.concat(t, '": "').concat(n, '". Options are "').concat(Object.keys(r).join('", "'), '"'), js.INVALID_VALUE, s) || this; + function(r) { + v0(e, r); + function e(t, n, i, s) { + return r.call(this, 'Invalid values for "'.concat(t, '": "').concat(n, '". Options are "').concat(Object.keys(i).join('", "'), '"'), js.INVALID_VALUE, s) || this; } return e; }(y0) ), I7 = ( /** @class */ - function(i) { - v0(e, i); - function e(t, n, r) { - return i.call(this, 'Value for "'.concat(t, '" must be of type ').concat(n), js.INVALID_VALUE, r) || this; + function(r) { + v0(e, r); + function e(t, n, i) { + return r.call(this, 'Value for "'.concat(t, '" must be of type ').concat(n), js.INVALID_VALUE, i) || this; } return e; }(y0) ), L7 = ( /** @class */ - function(i) { - v0(e, i); + function(r) { + v0(e, r); function e(t, n) { - return i.call(this, 'The intl string context variable "'.concat(t, '" was not provided to the string "').concat(n, '"'), js.MISSING_VALUE, n) || this; + return r.call(this, 'The intl string context variable "'.concat(t, '" was not provided to the string "').concat(n, '"'), js.MISSING_VALUE, n) || this; } return e; }(y0) ), un; -(function(i) { - i[i.literal = 0] = "literal", i[i.object = 1] = "object"; +(function(r) { + r[r.literal = 0] = "literal", r[r.object = 1] = "object"; })(un || (un = {})); -function R7(i) { - return i.length < 2 ? i : i.reduce(function(e, t) { +function R7(r) { + return r.length < 2 ? r : r.reduce(function(e, t) { var n = e[e.length - 1]; return !n || n.type !== un.literal || t.type !== un.literal ? e.push(t) : n.value += t.value, e; }, []); } -function C7(i) { - return typeof i == "function"; +function C7(r) { + return typeof r == "function"; } -function sl(i, e, t, n, r, s, a) { - if (i.length === 1 && um(i[0])) +function sl(r, e, t, n, i, s, a) { + if (r.length === 1 && um(r[0])) return [ { type: un.literal, - value: i[0].value + value: r[0].value } ]; - for (var o = [], l = 0, u = i; l < u.length; l++) { + for (var o = [], l = 0, u = r; l < u.length; l++) { var c = u[l]; if (um(c)) { o.push({ @@ -19359,9 +19359,9 @@ function sl(i, e, t, n, r, s, a) { continue; } var h = c.value; - if (!(r && h in r)) + if (!(i && h in i)) throw new L7(h, a); - var d = r[h]; + var d = i[h]; if (jE(c)) { (!d || typeof d == "string" || typeof d == "number") && (d = typeof d == "string" || typeof d == "number" ? String(d) : ""), o.push({ type: typeof d == "string" ? un.literal : un.object, @@ -19394,10 +19394,10 @@ function sl(i, e, t, n, r, s, a) { continue; } if (G_(c)) { - var m = c.children, g = c.value, p = r[g]; + var m = c.children, g = c.value, p = i[g]; if (!C7(p)) throw new I7(g, "function", a); - var b = sl(m, e, t, n, r, s), y = p(b.map(function(A) { + var b = sl(m, e, t, n, i, s), y = p(b.map(function(A) { return A.value; })); Array.isArray(y) || (y = [y]), o.push.apply(o, y.map(function(A) { @@ -19411,7 +19411,7 @@ function sl(i, e, t, n, r, s, a) { var v = c.options[d] || c.options.other; if (!v) throw new pm(c.value, d, Object.keys(c.options), a); - o.push.apply(o, sl(v.value, e, t, n, r)); + o.push.apply(o, sl(v.value, e, t, n, i)); continue; } if (H_(c)) { @@ -19426,38 +19426,38 @@ Try polyfilling it using "@formatjs/intl-pluralrules" } if (!v) throw new pm(c.value, d, Object.keys(c.options), a); - o.push.apply(o, sl(v.value, e, t, n, r, d - (c.offset || 0))); + o.push.apply(o, sl(v.value, e, t, n, i, d - (c.offset || 0))); continue; } } return R7(o); } -function F7(i, e) { - return e ? Ve(Ve(Ve({}, i || {}), e || {}), Object.keys(i).reduce(function(t, n) { - return t[n] = Ve(Ve({}, i[n]), e[n] || {}), t; - }, {})) : i; +function F7(r, e) { + return e ? Ve(Ve(Ve({}, r || {}), e || {}), Object.keys(r).reduce(function(t, n) { + return t[n] = Ve(Ve({}, r[n]), e[n] || {}), t; + }, {})) : r; } -function P7(i, e) { - return e ? Object.keys(i).reduce(function(t, n) { - return t[n] = F7(i[n], e[n]), t; - }, Ve({}, i)) : i; +function P7(r, e) { + return e ? Object.keys(r).reduce(function(t, n) { + return t[n] = F7(r[n], e[n]), t; + }, Ve({}, r)) : r; } -function xu(i) { +function xu(r) { return { create: function() { return { get: function(e) { - return i[e]; + return r[e]; }, set: function(e, t) { - i[e] = t; + r[e] = t; } }; } }; } -function M7(i) { - return i === void 0 && (i = { +function M7(r) { + return r === void 0 && (r = { number: {}, dateTime: {}, pluralRules: {} @@ -19467,7 +19467,7 @@ function M7(i) { t[n] = arguments[n]; return new ((e = Intl.NumberFormat).bind.apply(e, Eu([void 0], t, !1)))(); }, { - cache: xu(i.number), + cache: xu(r.number), strategy: Au.variadic }), getDateTimeFormat: Tu(function() { @@ -19475,7 +19475,7 @@ function M7(i) { t[n] = arguments[n]; return new ((e = Intl.DateTimeFormat).bind.apply(e, Eu([void 0], t, !1)))(); }, { - cache: xu(i.dateTime), + cache: xu(r.dateTime), strategy: Au.variadic }), getPluralRules: Tu(function() { @@ -19483,7 +19483,7 @@ function M7(i) { t[n] = arguments[n]; return new ((e = Intl.PluralRules).bind.apply(e, Eu([void 0], t, !1)))(); }, { - cache: xu(i.pluralRules), + cache: xu(r.pluralRules), strategy: Au.variadic }) }; @@ -19491,9 +19491,9 @@ function M7(i) { var O7 = ( /** @class */ function() { - function i(e, t, n, r) { + function r(e, t, n, i) { var s = this; - if (t === void 0 && (t = i.defaultLocale), this.formatterCache = { + if (t === void 0 && (t = r.defaultLocale), this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} @@ -19513,29 +19513,29 @@ var O7 = ( }; }, this.getAst = function() { return s.ast; - }, this.locales = t, this.resolvedLocale = i.resolveLocale(t), typeof e == "string") { - if (this.message = e, !i.__parse) + }, this.locales = t, this.resolvedLocale = r.resolveLocale(t), typeof e == "string") { + if (this.message = e, !r.__parse) throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`"); - this.ast = i.__parse(e, { - ignoreTag: r == null ? void 0 : r.ignoreTag, + this.ast = r.__parse(e, { + ignoreTag: i == null ? void 0 : i.ignoreTag, locale: this.resolvedLocale }); } else this.ast = e; if (!Array.isArray(this.ast)) throw new TypeError("A message must be provided as a String or AST."); - this.formats = P7(i.formats, n), this.formatters = r && r.formatters || M7(this.formatterCache); + this.formats = P7(r.formats, n), this.formatters = i && i.formatters || M7(this.formatterCache); } - return Object.defineProperty(i, "defaultLocale", { + return Object.defineProperty(r, "defaultLocale", { get: function() { - return i.memoizedDefaultLocale || (i.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), i.memoizedDefaultLocale; + return r.memoizedDefaultLocale || (r.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), r.memoizedDefaultLocale; }, enumerable: !1, configurable: !0 - }), i.memoizedDefaultLocale = null, i.resolveLocale = function(e) { + }), r.memoizedDefaultLocale = null, r.resolveLocale = function(e) { var t = Intl.NumberFormat.supportedLocalesOf(e); return t.length > 0 ? new Intl.Locale(t[0]) : new Intl.Locale(typeof e == "string" ? e : e[0]); - }, i.__parse = S7, i.formats = { + }, r.__parse = S7, r.formats = { number: { integer: { maximumFractionDigits: 0 @@ -19593,114 +19593,114 @@ var O7 = ( timeZoneName: "short" } } - }, i; + }, r; }() ); -function B7(i, e) { +function B7(r, e) { if (e == null) return; - if (e in i) - return i[e]; + if (e in r) + return r[e]; const t = e.split("."); - let n = i; - for (let r = 0; r < t.length; r++) + let n = r; + for (let i = 0; i < t.length; i++) if (typeof n == "object") { - if (r > 0) { - const s = t.slice(r, t.length).join("."); + if (i > 0) { + const s = t.slice(i, t.length).join("."); if (s in n) { n = n[s]; break; } } - n = n[t[r]]; + n = n[t[i]]; } else n = void 0; return n; } -const Er = {}, N7 = (i, e, t) => t && (e in Er || (Er[e] = {}), i in Er[e] || (Er[e][i] = t), t), J_ = (i, e) => { +const Ei = {}, N7 = (r, e, t) => t && (e in Ei || (Ei[e] = {}), r in Ei[e] || (Ei[e][r] = t), t), J_ = (r, e) => { if (e == null) return; - if (e in Er && i in Er[e]) - return Er[e][i]; + if (e in Ei && r in Ei[e]) + return Ei[e][r]; const t = b0(e); for (let n = 0; n < t.length; n++) { - const r = t[n], s = U7(r, i); + const i = t[n], s = U7(i, r); if (s) - return N7(i, e, s); + return N7(r, e, s); } }; let Oh; -const io = no({}); -function $7(i) { - return Oh[i] || null; +const ro = no({}); +function $7(r) { + return Oh[r] || null; } -function ev(i) { - return i in Oh; +function ev(r) { + return r in Oh; } -function U7(i, e) { - if (!ev(i)) +function U7(r, e) { + if (!ev(r)) return null; - const t = $7(i); + const t = $7(r); return B7(t, e); } -function H7(i) { - if (i == null) +function H7(r) { + if (r == null) return; - const e = b0(i); + const e = b0(r); for (let t = 0; t < e.length; t++) { const n = e[t]; if (ev(n)) return n; } } -function G7(i, ...e) { - delete Er[i], io.update((t) => (t[i] = Vs.all([t[i] || {}, ...e]), t)); +function G7(r, ...e) { + delete Ei[r], ro.update((t) => (t[r] = Vs.all([t[r] || {}, ...e]), t)); } -ia( - [io], - ([i]) => Object.keys(i) +ra( + [ro], + ([r]) => Object.keys(r) ); -io.subscribe((i) => Oh = i); +ro.subscribe((r) => Oh = r); const al = {}; -function z7(i, e) { - al[i].delete(e), al[i].size === 0 && delete al[i]; +function z7(r, e) { + al[r].delete(e), al[r].size === 0 && delete al[r]; } -function tv(i) { - return al[i]; +function tv(r) { + return al[r]; } -function q7(i) { - return b0(i).map((e) => { +function q7(r) { + return b0(r).map((e) => { const t = tv(e); return [e, t ? [...t] : []]; }).filter(([, e]) => e.length > 0); } -function kc(i) { - return i == null ? !1 : b0(i).some( +function kc(r) { + return r == null ? !1 : b0(r).some( (e) => { var t; return (t = tv(e)) == null ? void 0 : t.size; } ); } -function V7(i, e) { +function V7(r, e) { return Promise.all( - e.map((n) => (z7(i, n), n().then((r) => r.default || r))) - ).then((n) => G7(i, ...n)); + e.map((n) => (z7(r, n), n().then((i) => i.default || i))) + ).then((n) => G7(r, ...n)); } const da = {}; -function nv(i) { - if (!kc(i)) - return i in da ? da[i] : Promise.resolve(); - const e = q7(i); - return da[i] = Promise.all( +function nv(r) { + if (!kc(r)) + return r in da ? da[r] : Promise.resolve(); + const e = q7(r); + return da[r] = Promise.all( e.map( ([t, n]) => V7(t, n) ) ).then(() => { - if (kc(i)) - return nv(i); - delete da[i]; - }), da[i]; + if (kc(r)) + return nv(r); + delete da[r]; + }), da[r]; } const K7 = { number: { @@ -19743,126 +19743,126 @@ function Ws() { return W7; } const wu = no(!1); -var Y7 = Object.defineProperty, X7 = Object.defineProperties, Q7 = Object.getOwnPropertyDescriptors, _m = Object.getOwnPropertySymbols, Z7 = Object.prototype.hasOwnProperty, J7 = Object.prototype.propertyIsEnumerable, vm = (i, e, t) => e in i ? Y7(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, e8 = (i, e) => { +var Y7 = Object.defineProperty, X7 = Object.defineProperties, Q7 = Object.getOwnPropertyDescriptors, _m = Object.getOwnPropertySymbols, Z7 = Object.prototype.hasOwnProperty, J7 = Object.prototype.propertyIsEnumerable, vm = (r, e, t) => e in r ? Y7(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, e8 = (r, e) => { for (var t in e || (e = {})) - Z7.call(e, t) && vm(i, t, e[t]); + Z7.call(e, t) && vm(r, t, e[t]); if (_m) for (var t of _m(e)) - J7.call(e, t) && vm(i, t, e[t]); - return i; -}, t8 = (i, e) => X7(i, Q7(e)); + J7.call(e, t) && vm(r, t, e[t]); + return r; +}, t8 = (r, e) => X7(r, Q7(e)); let Ic; const Il = no(null); -function ym(i) { - return i.split("-").map((e, t, n) => n.slice(0, t + 1).join("-")).reverse(); +function ym(r) { + return r.split("-").map((e, t, n) => n.slice(0, t + 1).join("-")).reverse(); } -function b0(i, e = Ws().fallbackLocale) { - const t = ym(i); +function b0(r, e = Ws().fallbackLocale) { + const t = ym(r); return e ? [.../* @__PURE__ */ new Set([...t, ...ym(e)])] : t; } function gs() { return Ic ?? void 0; } -Il.subscribe((i) => { - Ic = i ?? void 0, typeof window < "u" && i != null && document.documentElement.setAttribute("lang", i); +Il.subscribe((r) => { + Ic = r ?? void 0, typeof window < "u" && r != null && document.documentElement.setAttribute("lang", r); }); -const n8 = (i) => { - if (i && H7(i) && kc(i)) { +const n8 = (r) => { + if (r && H7(r) && kc(r)) { const { loadingDelay: e } = Ws(); let t; return typeof window < "u" && gs() != null && e ? t = window.setTimeout( () => wu.set(!0), e - ) : wu.set(!0), nv(i).then(() => { - Il.set(i); + ) : wu.set(!0), nv(r).then(() => { + Il.set(r); }).finally(() => { clearTimeout(t), wu.set(!1); }); } - return Il.set(i); -}, ro = t8(e8({}, Il), { + return Il.set(r); +}, io = t8(e8({}, Il), { set: n8 -}), E0 = (i) => { +}), E0 = (r) => { const e = /* @__PURE__ */ Object.create(null); return (n) => { - const r = JSON.stringify(n); - return r in e ? e[r] : e[r] = i(n); + const i = JSON.stringify(n); + return i in e ? e[i] : e[i] = r(n); }; }; -var i8 = Object.defineProperty, Ll = Object.getOwnPropertySymbols, iv = Object.prototype.hasOwnProperty, rv = Object.prototype.propertyIsEnumerable, bm = (i, e, t) => e in i ? i8(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Bh = (i, e) => { +var r8 = Object.defineProperty, Ll = Object.getOwnPropertySymbols, rv = Object.prototype.hasOwnProperty, iv = Object.prototype.propertyIsEnumerable, bm = (r, e, t) => e in r ? r8(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Bh = (r, e) => { for (var t in e || (e = {})) - iv.call(e, t) && bm(i, t, e[t]); + rv.call(e, t) && bm(r, t, e[t]); if (Ll) for (var t of Ll(e)) - rv.call(e, t) && bm(i, t, e[t]); - return i; -}, ra = (i, e) => { + iv.call(e, t) && bm(r, t, e[t]); + return r; +}, ia = (r, e) => { var t = {}; - for (var n in i) - iv.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]); - if (i != null && Ll) - for (var n of Ll(i)) - e.indexOf(n) < 0 && rv.call(i, n) && (t[n] = i[n]); + for (var n in r) + rv.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); + if (r != null && Ll) + for (var n of Ll(r)) + e.indexOf(n) < 0 && iv.call(r, n) && (t[n] = r[n]); return t; }; -const za = (i, e) => { +const za = (r, e) => { const { formats: t } = Ws(); - if (i in t && e in t[i]) - return t[i][e]; - throw new Error(`[svelte-i18n] Unknown "${e}" ${i} format.`); -}, r8 = E0( - (i) => { - var e = i, { locale: t, format: n } = e, r = ra(e, ["locale", "format"]); + if (r in t && e in t[r]) + return t[r][e]; + throw new Error(`[svelte-i18n] Unknown "${e}" ${r} format.`); +}, i8 = E0( + (r) => { + var e = r, { locale: t, format: n } = e, i = ia(e, ["locale", "format"]); if (t == null) throw new Error('[svelte-i18n] A "locale" must be set to format numbers'); - return n && (r = za("number", n)), new Intl.NumberFormat(t, r); + return n && (i = za("number", n)), new Intl.NumberFormat(t, i); } ), s8 = E0( - (i) => { - var e = i, { locale: t, format: n } = e, r = ra(e, ["locale", "format"]); + (r) => { + var e = r, { locale: t, format: n } = e, i = ia(e, ["locale", "format"]); if (t == null) throw new Error('[svelte-i18n] A "locale" must be set to format dates'); - return n ? r = za("date", n) : Object.keys(r).length === 0 && (r = za("date", "short")), new Intl.DateTimeFormat(t, r); + return n ? i = za("date", n) : Object.keys(i).length === 0 && (i = za("date", "short")), new Intl.DateTimeFormat(t, i); } ), a8 = E0( - (i) => { - var e = i, { locale: t, format: n } = e, r = ra(e, ["locale", "format"]); + (r) => { + var e = r, { locale: t, format: n } = e, i = ia(e, ["locale", "format"]); if (t == null) throw new Error( '[svelte-i18n] A "locale" must be set to format time values' ); - return n ? r = za("time", n) : Object.keys(r).length === 0 && (r = za("time", "short")), new Intl.DateTimeFormat(t, r); + return n ? i = za("time", n) : Object.keys(i).length === 0 && (i = za("time", "short")), new Intl.DateTimeFormat(t, i); } -), o8 = (i = {}) => { - var e = i, { +), o8 = (r = {}) => { + var e = r, { locale: t = gs() - } = e, n = ra(e, [ + } = e, n = ia(e, [ "locale" ]); - return r8(Bh({ locale: t }, n)); -}, l8 = (i = {}) => { - var e = i, { + return i8(Bh({ locale: t }, n)); +}, l8 = (r = {}) => { + var e = r, { locale: t = gs() - } = e, n = ra(e, [ + } = e, n = ia(e, [ "locale" ]); return s8(Bh({ locale: t }, n)); -}, u8 = (i = {}) => { - var e = i, { +}, u8 = (r = {}) => { + var e = r, { locale: t = gs() - } = e, n = ra(e, [ + } = e, n = ia(e, [ "locale" ]); return a8(Bh({ locale: t }, n)); }, c8 = E0( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - (i, e = gs()) => new O7(i, e, Ws().formats, { + (r, e = gs()) => new O7(r, e, Ws().formats, { ignoreTag: Ws().ignoreTag }) -), h8 = (i, e = {}) => { - var t, n, r, s; +), h8 = (r, e = {}) => { + var t, n, i, s; let a = e; - typeof i == "object" && (a = i, i = a.id); + typeof r == "object" && (a = r, r = a.id); const { values: o, locale: l = gs(), @@ -19872,12 +19872,12 @@ const za = (i, e) => { throw new Error( "[svelte-i18n] Cannot format a message without first setting the initial locale." ); - let c = J_(i, l); + let c = J_(r, l); if (!c) - c = (s = (r = (n = (t = Ws()).handleMissingMessage) == null ? void 0 : n.call(t, { locale: l, id: i, defaultValue: u })) != null ? r : u) != null ? s : i; + c = (s = (i = (n = (t = Ws()).handleMissingMessage) == null ? void 0 : n.call(t, { locale: l, id: r, defaultValue: u })) != null ? i : u) != null ? s : r; else if (typeof c != "string") return console.warn( - `[svelte-i18n] Message with id "${i}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.` + `[svelte-i18n] Message with id "${r}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.` ), c; if (!o) return c; @@ -19886,27 +19886,27 @@ const za = (i, e) => { h = c8(c, l).format(o); } catch (d) { d instanceof Error && console.warn( - `[svelte-i18n] Message "${i}" has syntax error:`, + `[svelte-i18n] Message "${r}" has syntax error:`, d.message ); } return h; -}, d8 = (i, e) => u8(e).format(i), f8 = (i, e) => l8(e).format(i), m8 = (i, e) => o8(e).format(i), g8 = (i, e = gs()) => J_(i, e); -ia([ro, io], () => h8); -ia([ro], () => d8); -ia([ro], () => f8); -ia([ro], () => m8); -ia([ro, io], () => g8); +}, d8 = (r, e) => u8(e).format(r), f8 = (r, e) => l8(e).format(r), m8 = (r, e) => o8(e).format(r), g8 = (r, e = gs()) => J_(r, e); +ra([io, ro], () => h8); +ra([io], () => d8); +ra([io], () => f8); +ra([io], () => m8); +ra([io, ro], () => g8); const { SvelteComponent: p8, append_hydration: Tn, - attr: qr, - children: Vr, - claim_element: Kr, + attr: qi, + children: Vi, + claim_element: Ki, claim_space: Lc, claim_text: Fs, - detach: tr, - element: jr, + detach: ti, + element: ji, init: _8, insert_hydration: sv, noop: Em, @@ -19917,39 +19917,39 @@ const { text: Ps, toggle_class: Sm } = window.__gradio__svelte__internal, { onMount: y8, createEventDispatcher: b8, onDestroy: E8 } = window.__gradio__svelte__internal; -function Tm(i) { - let e, t, n, r, s = Ta( +function Tm(r) { + let e, t, n, i, s = Ta( /*file_to_display*/ - i[2] + r[2] ) + "", a, o, l, u, c = ( /*file_to_display*/ - i[2].orig_name + "" + r[2].orig_name + "" ), h; return { c() { - e = jr("div"), t = jr("span"), n = jr("div"), r = jr("progress"), a = Ps(s), l = Rc(), u = jr("span"), h = Ps(c), this.h(); + e = ji("div"), t = ji("span"), n = ji("div"), i = ji("progress"), a = Ps(s), l = Rc(), u = ji("span"), h = Ps(c), this.h(); }, l(d) { - e = Kr(d, "DIV", { class: !0 }); - var f = Vr(e); - t = Kr(f, "SPAN", {}); - var m = Vr(t); - n = Kr(m, "DIV", { class: !0 }); - var g = Vr(n); - r = Kr(g, "PROGRESS", { style: !0, max: !0, class: !0 }); - var p = Vr(r); - a = Fs(p, s), p.forEach(tr), g.forEach(tr), m.forEach(tr), l = Lc(f), u = Kr(f, "SPAN", { class: !0 }); - var b = Vr(u); - h = Fs(b, c), b.forEach(tr), f.forEach(tr), this.h(); + e = Ki(d, "DIV", { class: !0 }); + var f = Vi(e); + t = Ki(f, "SPAN", {}); + var m = Vi(t); + n = Ki(m, "DIV", { class: !0 }); + var g = Vi(n); + i = Ki(g, "PROGRESS", { style: !0, max: !0, class: !0 }); + var p = Vi(i); + a = Fs(p, s), p.forEach(ti), g.forEach(ti), m.forEach(ti), l = Lc(f), u = Ki(f, "SPAN", { class: !0 }); + var b = Vi(u); + h = Fs(b, c), b.forEach(ti), f.forEach(ti), this.h(); }, h() { - Du(r, "visibility", "hidden"), Du(r, "height", "0"), Du(r, "width", "0"), r.value = o = Ta( + Du(i, "visibility", "hidden"), Du(i, "height", "0"), Du(i, "width", "0"), i.value = o = Ta( /*file_to_display*/ - i[2] - ), qr(r, "max", "100"), qr(r, "class", "svelte-cr2edf"), qr(n, "class", "progress-bar svelte-cr2edf"), qr(u, "class", "file-name svelte-cr2edf"), qr(e, "class", "file svelte-cr2edf"); + r[2] + ), qi(i, "max", "100"), qi(i, "class", "svelte-cr2edf"), qi(n, "class", "progress-bar svelte-cr2edf"), qi(u, "class", "file-name svelte-cr2edf"), qi(e, "class", "file svelte-cr2edf"); }, m(d, f) { - sv(d, e, f), Tn(e, t), Tn(t, n), Tn(n, r), Tn(r, a), Tn(e, l), Tn(e, u), Tn(u, h); + sv(d, e, f), Tn(e, t), Tn(t, n), Tn(n, i), Tn(i, a), Tn(e, l), Tn(e, u), Tn(u, h); }, p(d, f) { f & /*file_to_display*/ @@ -19960,43 +19960,43 @@ function Tm(i) { 4 && o !== (o = Ta( /*file_to_display*/ d[2] - )) && (r.value = o), f & /*file_to_display*/ + )) && (i.value = o), f & /*file_to_display*/ 4 && c !== (c = /*file_to_display*/ d[2].orig_name + "") && Rl(h, c); }, d(d) { - d && tr(e); + d && ti(e); } }; } -function S8(i) { - let e, t, n, r = ( +function S8(r) { + let e, t, n, i = ( /*files_with_progress*/ - i[0].length + "" + r[0].length + "" ), s, a, o = ( /*files_with_progress*/ - i[0].length > 1 ? "files" : "file" + r[0].length > 1 ? "files" : "file" ), l, u, c, h = ( /*file_to_display*/ - i[2] && Tm(i) + r[2] && Tm(r) ); return { c() { - e = jr("div"), t = jr("span"), n = Ps("Uploading "), s = Ps(r), a = Rc(), l = Ps(o), u = Ps("..."), c = Rc(), h && h.c(), this.h(); + e = ji("div"), t = ji("span"), n = Ps("Uploading "), s = Ps(i), a = Rc(), l = Ps(o), u = Ps("..."), c = Rc(), h && h.c(), this.h(); }, l(d) { - e = Kr(d, "DIV", { class: !0 }); - var f = Vr(e); - t = Kr(f, "SPAN", { class: !0 }); - var m = Vr(t); - n = Fs(m, "Uploading "), s = Fs(m, r), a = Lc(m), l = Fs(m, o), u = Fs(m, "..."), m.forEach(tr), c = Lc(f), h && h.l(f), f.forEach(tr), this.h(); + e = Ki(d, "DIV", { class: !0 }); + var f = Vi(e); + t = Ki(f, "SPAN", { class: !0 }); + var m = Vi(t); + n = Fs(m, "Uploading "), s = Fs(m, i), a = Lc(m), l = Fs(m, o), u = Fs(m, "..."), m.forEach(ti), c = Lc(f), h && h.l(f), f.forEach(ti), this.h(); }, h() { - qr(t, "class", "uploading svelte-cr2edf"), qr(e, "class", "wrap svelte-cr2edf"), Sm( + qi(t, "class", "uploading svelte-cr2edf"), qi(e, "class", "wrap svelte-cr2edf"), Sm( e, "progress", /*progress*/ - i[1] + r[1] ); }, m(d, f) { @@ -20004,8 +20004,8 @@ function S8(i) { }, p(d, [f]) { f & /*files_with_progress*/ - 1 && r !== (r = /*files_with_progress*/ - d[0].length + "") && Rl(s, r), f & /*files_with_progress*/ + 1 && i !== (i = /*files_with_progress*/ + d[0].length + "") && Rl(s, i), f & /*files_with_progress*/ 1 && o !== (o = /*files_with_progress*/ d[0].length > 1 ? "files" : "file") && Rl(l, o), /*file_to_display*/ d[2] ? h ? h.p(d, f) : (h = Tm(d), h.c(), h.m(e, null)) : h && (h.d(1), h = null), f & /*progress*/ @@ -20019,20 +20019,20 @@ function S8(i) { i: Em, o: Em, d(d) { - d && tr(e), h && h.d(); + d && ti(e), h && h.d(); } }; } -function Ta(i) { - return i.progress * 100 / (i.size || 0) || 0; +function Ta(r) { + return r.progress * 100 / (r.size || 0) || 0; } -function T8(i) { +function T8(r) { let e = 0; - return i.forEach((t) => { + return r.forEach((t) => { e += Ta(t); - }), document.documentElement.style.setProperty("--upload-progress-width", (e / i.length).toFixed(2) + "%"), e / i.length; + }), document.documentElement.style.setProperty("--upload-progress-width", (e / r.length).toFixed(2) + "%"), e / r.length; } -function A8(i, e, t) { +function A8(r, e, t) { var n = this && this.__awaiter || function(g, p, b, y) { function v(T) { return T instanceof b ? T : new b(function(A) { @@ -20060,13 +20060,13 @@ function A8(i, e, t) { L((y = y.apply(g, p || [])).next()); }); }; - let { upload_id: r } = e, { root: s } = e, { files: a } = e, { stream_handler: o } = e, l, u = !1, c, h, d = a.map((g) => Object.assign(Object.assign({}, g), { progress: 0 })); + let { upload_id: i } = e, { root: s } = e, { files: a } = e, { stream_handler: o } = e, l, u = !1, c, h, d = a.map((g) => Object.assign(Object.assign({}, g), { progress: 0 })); const f = b8(); function m(g, p) { t(0, d = d.map((b) => (b.orig_name === g && (b.progress += p), b))); } return y8(() => n(void 0, void 0, void 0, function* () { - if (l = yield o(new URL(`${s}/gradio_api/upload_progress?upload_id=${r}`)), l == null) + if (l = yield o(new URL(`${s}/gradio_api/upload_progress?upload_id=${i}`)), l == null) throw new Error("Event source is not defined"); l.onmessage = function(g) { return n(this, void 0, void 0, function* () { @@ -20076,17 +20076,17 @@ function A8(i, e, t) { }; })), E8(() => { (l != null || l != null) && l.close(); - }), i.$$set = (g) => { - "upload_id" in g && t(3, r = g.upload_id), "root" in g && t(4, s = g.root), "files" in g && t(5, a = g.files), "stream_handler" in g && t(6, o = g.stream_handler); - }, i.$$.update = () => { - i.$$.dirty & /*files_with_progress*/ - 1 && T8(d), i.$$.dirty & /*current_file_upload, files_with_progress*/ + }), r.$$set = (g) => { + "upload_id" in g && t(3, i = g.upload_id), "root" in g && t(4, s = g.root), "files" in g && t(5, a = g.files), "stream_handler" in g && t(6, o = g.stream_handler); + }, r.$$.update = () => { + r.$$.dirty & /*files_with_progress*/ + 1 && T8(d), r.$$.dirty & /*current_file_upload, files_with_progress*/ 129 && t(2, h = c || d[0]); }, [ d, u, h, - r, + i, s, a, o, @@ -20104,16 +20104,16 @@ class x8 extends p8 { } } function w8() { - let i, e; + let r, e; return { drag(t, n = {}) { e = n; - function r() { - i = document.createElement("input"), i.type = "file", i.style.display = "none", i.setAttribute("aria-label", "File upload"), i.setAttribute("data-testid", "file-upload"); + function i() { + r = document.createElement("input"), r.type = "file", r.style.display = "none", r.setAttribute("aria-label", "File upload"), r.setAttribute("data-testid", "file-upload"); const h = Array.isArray(e.accepted_types) ? e.accepted_types.join(",") : e.accepted_types || void 0; - h && (i.accept = h), i.multiple = e.mode === "multiple" || !1, e.mode === "directory" && (i.webkitdirectory = !0, i.setAttribute("directory", ""), i.setAttribute("mozdirectory", "")), t.appendChild(i); + h && (r.accept = h), r.multiple = e.mode === "multiple" || !1, e.mode === "directory" && (r.webkitdirectory = !0, r.setAttribute("directory", ""), r.setAttribute("mozdirectory", "")), t.appendChild(r); } - r(); + i(); function s(h) { h.preventDefault(), h.stopPropagation(); } @@ -20132,33 +20132,33 @@ function w8() { d.length > 0 && ((g = e.on_files) == null || g.call(e, d)); } function u() { - e.disable_click || (i.value = "", i.click()); + e.disable_click || (r.value = "", r.click()); } function c() { var h; - if (i.files) { - const d = Array.from(i.files); + if (r.files) { + const d = Array.from(r.files); d.length > 0 && ((h = e.on_files) == null || h.call(e, d)); } } - return t.addEventListener("drag", s), t.addEventListener("dragstart", s), t.addEventListener("dragend", s), t.addEventListener("dragover", s), t.addEventListener("dragenter", a), t.addEventListener("dragleave", o), t.addEventListener("drop", l), t.addEventListener("click", u), i.addEventListener("change", c), { + return t.addEventListener("drag", s), t.addEventListener("dragstart", s), t.addEventListener("dragend", s), t.addEventListener("dragover", s), t.addEventListener("dragenter", a), t.addEventListener("dragleave", o), t.addEventListener("drop", l), t.addEventListener("click", u), r.addEventListener("change", c), { update(h) { - e = h, i.remove(), r(), i.addEventListener("change", c); + e = h, r.remove(), i(), r.addEventListener("change", c); }, destroy() { - t.removeEventListener("drag", s), t.removeEventListener("dragstart", s), t.removeEventListener("dragend", s), t.removeEventListener("dragover", s), t.removeEventListener("dragenter", a), t.removeEventListener("dragleave", o), t.removeEventListener("drop", l), t.removeEventListener("click", u), i.removeEventListener("change", c), i.remove(); + t.removeEventListener("drag", s), t.removeEventListener("dragstart", s), t.removeEventListener("dragend", s), t.removeEventListener("dragover", s), t.removeEventListener("dragenter", a), t.removeEventListener("dragleave", o), t.removeEventListener("drop", l), t.removeEventListener("click", u), r.removeEventListener("change", c), r.remove(); } }; }, open_file_upload() { - i && (i.value = "", i.click()); + r && (r.value = "", r.click()); } }; } const { SvelteComponent: D8, action_destroyer: k8, - attr: mi, + attr: mr, check_outros: av, children: ov, claim_component: I8, @@ -20180,20 +20180,20 @@ const { safe_not_equal: O8, set_style: Fl, toggle_class: vt, - transition_in: Tr, - transition_out: rs, + transition_in: Ti, + transition_out: is, update_slot_base: mv } = window.__gradio__svelte__internal, { createEventDispatcher: B8, tick: N8, getContext: nV } = window.__gradio__svelte__internal; -function $8(i) { - let e, t, n, r, s, a, o; +function $8(r) { + let e, t, n, i, s, a, o; const l = ( /*#slots*/ - i[30].default + r[30].default ), u = uv( l, - i, + r, /*$$scope*/ - i[29], + r[29], null ); return { @@ -20211,74 +20211,74 @@ function $8(i) { u && u.l(h), h.forEach(Ys), this.h(); }, h() { - mi(e, "tabindex", t = /*hidden*/ - i[9] ? -1 : 0), mi(e, "aria-label", n = /*aria_label*/ - i[14] || "Click to upload or drop files"), mi(e, "aria-dropeffect", "copy"), mi(e, "class", "svelte-1o7nwih"), vt( + mr(e, "tabindex", t = /*hidden*/ + r[9] ? -1 : 0), mr(e, "aria-label", n = /*aria_label*/ + r[14] || "Click to upload or drop files"), mr(e, "aria-dropeffect", "copy"), mr(e, "class", "svelte-1o7nwih"), vt( e, "hidden", /*hidden*/ - i[9] + r[9] ), vt( e, "center", /*center*/ - i[4] + r[4] ), vt( e, "boundedheight", /*boundedheight*/ - i[3] + r[3] ), vt( e, "flex", /*flex*/ - i[5] + r[5] ), vt( e, "disable_click", /*disable_click*/ - i[7] + r[7] ), vt( e, "icon-mode", /*icon_upload*/ - i[12] + r[12] ), Fl( e, "height", /*icon_upload*/ - i[12] ? "" : ( + r[12] ? "" : ( /*height*/ - i[13] ? typeof /*height*/ - i[13] == "number" ? ( + r[13] ? typeof /*height*/ + r[13] == "number" ? ( /*height*/ - i[13] + "px" + r[13] + "px" ) : ( /*height*/ - i[13] + r[13] ) : "100%" ) ); }, m(c, h) { - S0(c, e, h), u && u.m(e, null), s = !0, a || (o = k8(r = /*drag*/ - i[19].call(null, e, { + S0(c, e, h), u && u.m(e, null), s = !0, a || (o = k8(i = /*drag*/ + r[19].call(null, e, { on_drag_change: xm, on_files: ( /*drag_function_1*/ - i[31] + r[31] ), accepted_types: ( /*accept_file_types*/ - i[18] + r[18] ), mode: ( /*file_count*/ - i[6] + r[6] ), disable_click: ( /*disable_click*/ - i[7] + r[7] ) })), a = !0); }, @@ -20303,10 +20303,10 @@ function $8(i) { null ), (!s || h[0] & /*hidden*/ 512 && t !== (t = /*hidden*/ - c[9] ? -1 : 0)) && mi(e, "tabindex", t), (!s || h[0] & /*aria_label*/ + c[9] ? -1 : 0)) && mr(e, "tabindex", t), (!s || h[0] & /*aria_label*/ 16384 && n !== (n = /*aria_label*/ - c[14] || "Click to upload or drop files")) && mi(e, "aria-label", n), r && F8(r.update) && h[0] & /*accept_file_types, file_count, disable_click*/ - 262336 && r.update.call(null, { + c[14] || "Click to upload or drop files")) && mr(e, "aria-label", n), i && F8(i.update) && h[0] & /*accept_file_types, file_count, disable_click*/ + 262336 && i.update.call(null, { on_drag_change: xm, on_files: ( /*drag_function_1*/ @@ -20379,57 +20379,57 @@ function $8(i) { ); }, i(c) { - s || (Tr(u, c), s = !0); + s || (Ti(u, c), s = !0); }, o(c) { - rs(u, c), s = !1; + is(u, c), s = !1; }, d(c) { c && Ys(e), u && u.d(c), a = !1, o(); } }; } -function U8(i) { +function U8(r) { let e, t, n = !/*hidden*/ - i[9] && Am(i); + r[9] && Am(r); return { c() { n && n.c(), e = Cl(); }, - l(r) { - n && n.l(r), e = Cl(); + l(i) { + n && n.l(i), e = Cl(); }, - m(r, s) { - n && n.m(r, s), S0(r, e, s), t = !0; + m(i, s) { + n && n.m(i, s), S0(i, e, s), t = !0; }, - p(r, s) { + p(i, s) { /*hidden*/ - r[9] ? n && (fv(), rs(n, 1, 1, () => { + i[9] ? n && (fv(), is(n, 1, 1, () => { n = null; - }), av()) : n ? (n.p(r, s), s[0] & /*hidden*/ - 512 && Tr(n, 1)) : (n = Am(r), n.c(), Tr(n, 1), n.m(e.parentNode, e)); + }), av()) : n ? (n.p(i, s), s[0] & /*hidden*/ + 512 && Ti(n, 1)) : (n = Am(i), n.c(), Ti(n, 1), n.m(e.parentNode, e)); }, - i(r) { - t || (Tr(n), t = !0); + i(i) { + t || (Ti(n), t = !0); }, - o(r) { - rs(n), t = !1; + o(i) { + is(n), t = !1; }, - d(r) { - r && Ys(e), n && n.d(r); + d(i) { + i && Ys(e), n && n.d(i); } }; } -function H8(i) { - let e, t, n, r, s, a; +function H8(r) { + let e, t, n, i, s, a; const o = ( /*#slots*/ - i[30].default + r[30].default ), l = uv( o, - i, + r, /*$$scope*/ - i[29], + r[29], null ); return { @@ -20446,67 +20446,67 @@ function H8(i) { l && l.l(c), c.forEach(Ys), this.h(); }, h() { - mi(e, "tabindex", t = /*hidden*/ - i[9] ? -1 : 0), mi(e, "aria-label", n = /*aria_label*/ - i[14] || "Paste from clipboard"), mi(e, "class", "svelte-1o7nwih"), vt( + mr(e, "tabindex", t = /*hidden*/ + r[9] ? -1 : 0), mr(e, "aria-label", n = /*aria_label*/ + r[14] || "Paste from clipboard"), mr(e, "class", "svelte-1o7nwih"), vt( e, "hidden", /*hidden*/ - i[9] + r[9] ), vt( e, "center", /*center*/ - i[4] + r[4] ), vt( e, "boundedheight", /*boundedheight*/ - i[3] + r[3] ), vt( e, "flex", /*flex*/ - i[5] + r[5] ), vt( e, "icon-mode", /*icon_upload*/ - i[12] + r[12] ), Fl( e, "height", /*icon_upload*/ - i[12] ? "" : ( + r[12] ? "" : ( /*height*/ - i[13] ? typeof /*height*/ - i[13] == "number" ? ( + r[13] ? typeof /*height*/ + r[13] == "number" ? ( /*height*/ - i[13] + "px" + r[13] + "px" ) : ( /*height*/ - i[13] + r[13] ) : "100%" ) ); }, m(u, c) { - S0(u, e, c), l && l.m(e, null), r = !0, s || (a = P8( + S0(u, e, c), l && l.m(e, null), i = !0, s || (a = P8( e, "click", /*paste_clipboard*/ - i[15] + r[15] ), s = !0); }, p(u, c) { - l && l.p && (!r || c[0] & /*$$scope*/ + l && l.p && (!i || c[0] & /*$$scope*/ 536870912) && mv( l, o, u, /*$$scope*/ u[29], - r ? dv( + i ? dv( o, /*$$scope*/ u[29], @@ -20517,35 +20517,35 @@ function H8(i) { u[29] ), null - ), (!r || c[0] & /*hidden*/ + ), (!i || c[0] & /*hidden*/ 512 && t !== (t = /*hidden*/ - u[9] ? -1 : 0)) && mi(e, "tabindex", t), (!r || c[0] & /*aria_label*/ + u[9] ? -1 : 0)) && mr(e, "tabindex", t), (!i || c[0] & /*aria_label*/ 16384 && n !== (n = /*aria_label*/ - u[14] || "Paste from clipboard")) && mi(e, "aria-label", n), (!r || c[0] & /*hidden*/ + u[14] || "Paste from clipboard")) && mr(e, "aria-label", n), (!i || c[0] & /*hidden*/ 512) && vt( e, "hidden", /*hidden*/ u[9] - ), (!r || c[0] & /*center*/ + ), (!i || c[0] & /*center*/ 16) && vt( e, "center", /*center*/ u[4] - ), (!r || c[0] & /*boundedheight*/ + ), (!i || c[0] & /*boundedheight*/ 8) && vt( e, "boundedheight", /*boundedheight*/ u[3] - ), (!r || c[0] & /*flex*/ + ), (!i || c[0] & /*flex*/ 32) && vt( e, "flex", /*flex*/ u[5] - ), (!r || c[0] & /*icon_upload*/ + ), (!i || c[0] & /*icon_upload*/ 4096) && vt( e, "icon-mode", @@ -20570,35 +20570,35 @@ function H8(i) { ); }, i(u) { - r || (Tr(l, u), r = !0); + i || (Ti(l, u), i = !0); }, o(u) { - rs(l, u), r = !1; + is(l, u), i = !1; }, d(u) { u && Ys(e), l && l.d(u), s = !1, a(); } }; } -function Am(i) { +function Am(r) { let e, t; return e = new x8({ props: { root: ( /*root*/ - i[8] + r[8] ), upload_id: ( /*upload_id*/ - i[16] + r[16] ), files: ( /*file_data*/ - i[17] + r[17] ), stream_handler: ( /*stream_handler*/ - i[11] + r[11] ) } }), { @@ -20608,34 +20608,34 @@ function Am(i) { l(n) { I8(e.$$.fragment, n); }, - m(n, r) { - M8(e, n, r), t = !0; + m(n, i) { + M8(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*root*/ + i[0] & /*root*/ 256 && (s.root = /*root*/ - n[8]), r[0] & /*upload_id*/ + n[8]), i[0] & /*upload_id*/ 65536 && (s.upload_id = /*upload_id*/ - n[16]), r[0] & /*file_data*/ + n[16]), i[0] & /*file_data*/ 131072 && (s.files = /*file_data*/ - n[17]), r[0] & /*stream_handler*/ + n[17]), i[0] & /*stream_handler*/ 2048 && (s.stream_handler = /*stream_handler*/ n[11]), e.$set(s); }, i(n) { - t || (Tr(e.$$.fragment, n), t = !0); + t || (Ti(e.$$.fragment, n), t = !0); }, o(n) { - rs(e.$$.fragment, n), t = !1; + is(e.$$.fragment, n), t = !1; }, d(n) { R8(e, n); } }; } -function G8(i) { - let e, t, n, r; +function G8(r) { + let e, t, n, i; const s = [H8, U8, $8], a = []; function o(l, u) { return ( @@ -20647,7 +20647,7 @@ function G8(i) { ) ); } - return e = o(i), t = a[e] = s[e](i), { + return e = o(r), t = a[e] = s[e](r), { c() { t.c(), n = Cl(); }, @@ -20655,43 +20655,43 @@ function G8(i) { t.l(l), n = Cl(); }, m(l, u) { - a[e].m(l, u), S0(l, n, u), r = !0; + a[e].m(l, u), S0(l, n, u), i = !0; }, p(l, u) { let c = e; - e = o(l), e === c ? a[e].p(l, u) : (fv(), rs(a[c], 1, 1, () => { + e = o(l), e === c ? a[e].p(l, u) : (fv(), is(a[c], 1, 1, () => { a[c] = null; - }), av(), t = a[e], t ? t.p(l, u) : (t = a[e] = s[e](l), t.c()), Tr(t, 1), t.m(n.parentNode, n)); + }), av(), t = a[e], t ? t.p(l, u) : (t = a[e] = s[e](l), t.c()), Ti(t, 1), t.m(n.parentNode, n)); }, i(l) { - r || (Tr(t), r = !0); + i || (Ti(t), i = !0); }, o(l) { - rs(t), r = !1; + is(t), i = !1; }, d(l) { l && Ys(n), a[e].d(l); } }; } -function z8(i, e, t) { - if (!i || i === "*" || i === "file/*" || Array.isArray(i) && i.some((r) => r === "*" || r === "file/*")) +function z8(r, e, t) { + if (!r || r === "*" || r === "file/*" || Array.isArray(r) && r.some((i) => i === "*" || i === "file/*")) return !0; let n; - if (typeof i == "string") - n = i.split(",").map((r) => r.trim()); - else if (Array.isArray(i)) - n = i; + if (typeof r == "string") + n = r.split(",").map((i) => i.trim()); + else if (Array.isArray(r)) + n = r; else return !1; - return n.includes(e) || n.some((r) => { - const [s] = r.split("/").map((a) => a.trim()); - return r.endsWith("/*") && t.startsWith(s + "/"); + return n.includes(e) || n.some((i) => { + const [s] = i.split("/").map((a) => a.trim()); + return i.endsWith("/*") && t.startsWith(s + "/"); }); } -const xm = (i) => i = i; -function q8(i, e, t) { - let n, { $$slots: r = {}, $$scope: s } = e; +const xm = (r) => r = r; +function q8(r, e, t) { + let n, { $$slots: i = {}, $$scope: s } = e; var a = this && this.__awaiter || function(j, me, ye, Ie) { function Rt(qe) { return qe instanceof ye ? qe : new ye(function(bt) { @@ -20816,10 +20816,10 @@ function q8(i, e, t) { }); } const xe = (j) => K(j); - return i.$$set = (j) => { + return r.$$set = (j) => { "filetype" in j && t(0, u = j.filetype), "dragging" in j && t(1, c = j.dragging), "boundedheight" in j && t(3, h = j.boundedheight), "center" in j && t(4, d = j.center), "flex" in j && t(5, f = j.flex), "file_count" in j && t(6, m = j.file_count), "disable_click" in j && t(7, g = j.disable_click), "root" in j && t(8, p = j.root), "hidden" in j && t(9, b = j.hidden), "format" in j && t(21, y = j.format), "uploading" in j && t(2, v = j.uploading), "show_progress" in j && t(10, T = j.show_progress), "max_file_size" in j && t(22, A = j.max_file_size), "upload" in j && t(23, w = j.upload), "stream_handler" in j && t(11, D = j.stream_handler), "icon_upload" in j && t(12, L = j.icon_upload), "height" in j && t(13, I = j.height), "aria_label" in j && t(14, R = j.aria_label), "$$scope" in j && t(29, s = j.$$scope); - }, i.$$.update = () => { - i.$$.dirty[0] & /*filetype, ios*/ + }, r.$$.update = () => { + r.$$.dirty[0] & /*filetype, ios*/ 268435457 && (u == null ? t(18, U = null) : typeof u == "string" ? t(18, U = Z(u)) : n && u.includes("file/*") ? t(18, U = "*") : (t(0, u = u.map(Z)), t(18, U = u.join(", ")))); }, t(28, n = Y()), [ u, @@ -20852,7 +20852,7 @@ function q8(i, e, t) { ge, n, s, - r, + i, xe ]; } @@ -20909,52 +20909,52 @@ class Nh extends D8 { return this.$$.ctx[27]; } } -const { setContext: iV, getContext: V8 } = window.__gradio__svelte__internal, K8 = "WORKER_PROXY_CONTEXT_KEY"; +const { setContext: rV, getContext: V8 } = window.__gradio__svelte__internal, K8 = "WORKER_PROXY_CONTEXT_KEY"; function gv() { return V8(K8); } const j8 = "lite.local"; -function W8(i) { - return i.host === window.location.host || i.host === "localhost:7860" || i.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194 - i.host === j8; +function W8(r) { + return r.host === window.location.host || r.host === "localhost:7860" || r.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194 + r.host === j8; } -function pv(i, e) { +function pv(r, e) { const t = e.toLowerCase(); - for (const [n, r] of Object.entries(i)) + for (const [n, i] of Object.entries(r)) if (n.toLowerCase() === t) - return r; + return i; } -function _v(i) { +function _v(r) { const e = typeof window < "u"; - if (i == null || !e) + if (r == null || !e) return !1; - const t = new URL(i, window.location.href); + const t = new URL(r, window.location.href); return !(!W8(t) || t.protocol !== "http:" && t.protocol !== "https:"); } let Mo; -async function vv(i) { +async function vv(r) { const e = typeof window < "u"; - if (i == null || !e || !_v(i)) - return i; + if (r == null || !e || !_v(r)) + return r; if (Mo == null) try { Mo = gv(); } catch { - return i; + return r; } if (Mo == null) - return i; - const n = new URL(i, window.location.href).pathname; + return r; + const n = new URL(r, window.location.href).pathname; return Mo.httpRequest({ method: "GET", path: n, headers: {}, query_string: "" - }).then((r) => { - if (r.status !== 200) + }).then((i) => { + if (i.status !== 200) throw new Error(`Failed to get file ${n} from the Wasm worker.`); - const s = new Blob([r.body], { - type: pv(r.headers, "content-type") + const s = new Blob([i.body], { + type: pv(i.headers, "content-type") }); return URL.createObjectURL(s); }); @@ -20986,24 +20986,24 @@ const { transition_in: ss, transition_out: as, update_slot_base: Gh -} = window.__gradio__svelte__internal, { createEventDispatcher: eS, onMount: rV } = window.__gradio__svelte__internal; -function tS(i) { - let e, t, n, r, s; +} = window.__gradio__svelte__internal, { createEventDispatcher: eS, onMount: iV } = window.__gradio__svelte__internal; +function tS(r) { + let e, t, n, i, s; const a = ( /*#slots*/ - i[8].default + r[8].default ), o = $h( a, - i, + r, /*$$scope*/ - i[7], + r[7], null ); let l = [ { class: "download-link" }, { href: ( /*href*/ - i[0] + r[0] ) }, { target: t = typeof window < "u" && window.__is_colab__ ? "_blank" : null @@ -21011,10 +21011,10 @@ function tS(i) { { rel: "noopener noreferrer" }, { download: ( /*download*/ - i[1] + r[1] ) }, /*$$restProps*/ - i[6] + r[6] ], u = {}; for (let c = 0; c < l.length; c += 1) u = Pl(u, l[c]); @@ -21037,12 +21037,12 @@ function tS(i) { Ol(e, u), Dm(e, "position", "relative"), Bl(e, "svelte-151nsdd", !0); }, m(c, h) { - T0(c, e, h), o && o.m(e, null), n = !0, r || (s = xv( + T0(c, e, h), o && o.m(e, null), n = !0, i || (s = xv( e, "click", /*dispatch*/ - i[3].bind(null, "click") - ), r = !0); + r[3].bind(null, "click") + ), i = !0); }, p(c, h) { o && o.p && (!n || h & /*$$scope*/ @@ -21089,20 +21089,20 @@ function tS(i) { as(o, c), n = !1; }, d(c) { - c && Xs(e), o && o.d(c), r = !1, s(); + c && Xs(e), o && o.d(c), i = !1, s(); } }; } -function nS(i) { - let e, t, n, r; - const s = [rS, iS], a = []; +function nS(r) { + let e, t, n, i; + const s = [iS, rS], a = []; function o(l, u) { return ( /*is_downloading*/ l[2] ? 0 : 1 ); } - return e = o(i), t = a[e] = s[e](i), { + return e = o(r), t = a[e] = s[e](r), { c() { t.c(), n = Ml(); }, @@ -21110,7 +21110,7 @@ function nS(i) { t.l(l), n = Ml(); }, m(l, u) { - a[e].m(l, u), T0(l, n, u), r = !0; + a[e].m(l, u), T0(l, n, u), i = !0; }, p(l, u) { let c = e; @@ -21119,34 +21119,34 @@ function nS(i) { }), yv(), t = a[e], t ? t.p(l, u) : (t = a[e] = s[e](l), t.c()), ss(t, 1), t.m(n.parentNode, n)); }, i(l) { - r || (ss(t), r = !0); + i || (ss(t), i = !0); }, o(l) { - as(t), r = !1; + as(t), i = !1; }, d(l) { l && Xs(n), a[e].d(l); } }; } -function iS(i) { - let e, t, n, r; +function rS(r) { + let e, t, n, i; const s = ( /*#slots*/ - i[8].default + r[8].default ), a = $h( s, - i, + r, /*$$scope*/ - i[7], + r[7], null ); let o = [ /*$$restProps*/ - i[6], + r[6], { href: ( /*href*/ - i[0] + r[0] ) } ], l = {}; for (let u = 0; u < o.length; u += 1) @@ -21164,9 +21164,9 @@ function iS(i) { Ol(e, l), Bl(e, "svelte-151nsdd", !0); }, m(u, c) { - T0(u, e, c), a && a.m(e, null), t = !0, n || (r = xv(e, "click", Z8( + T0(u, e, c), a && a.m(e, null), t = !0, n || (i = xv(e, "click", Z8( /*wasm_click_handler*/ - i[5] + r[5] )), n = !0); }, p(u, c) { @@ -21206,66 +21206,66 @@ function iS(i) { as(a, u), t = !1; }, d(u) { - u && Xs(e), a && a.d(u), n = !1, r(); + u && Xs(e), a && a.d(u), n = !1, i(); } }; } -function rS(i) { +function iS(r) { let e; const t = ( /*#slots*/ - i[8].default + r[8].default ), n = $h( t, - i, + r, /*$$scope*/ - i[7], + r[7], null ); return { c() { n && n.c(); }, - l(r) { - n && n.l(r); + l(i) { + n && n.l(i); }, - m(r, s) { - n && n.m(r, s), e = !0; + m(i, s) { + n && n.m(i, s), e = !0; }, - p(r, s) { + p(i, s) { n && n.p && (!e || s & /*$$scope*/ 128) && Gh( n, t, - r, + i, /*$$scope*/ - r[7], + i[7], e ? Hh( t, /*$$scope*/ - r[7], + i[7], s, null ) : Uh( /*$$scope*/ - r[7] + i[7] ), null ); }, - i(r) { - e || (ss(n, r), e = !0); + i(i) { + e || (ss(n, i), e = !0); }, - o(r) { - as(n, r), e = !1; + o(i) { + as(n, i), e = !1; }, - d(r) { - n && n.d(r); + d(i) { + n && n.d(i); } }; } -function sS(i) { - let e, t, n, r, s; +function sS(r) { + let e, t, n, i, s; const a = [nS, tS], o = []; function l(u, c) { return c & /*href*/ @@ -21275,21 +21275,21 @@ function sS(i) { u[0] ))), e ? 0 : 1; } - return t = l(i, -1), n = o[t] = a[t](i), { + return t = l(r, -1), n = o[t] = a[t](r), { c() { - n.c(), r = Ml(); + n.c(), i = Ml(); }, l(u) { - n.l(u), r = Ml(); + n.l(u), i = Ml(); }, m(u, c) { - o[t].m(u, c), T0(u, r, c), s = !0; + o[t].m(u, c), T0(u, i, c), s = !0; }, p(u, [c]) { let h = t; t = l(u, c), t === h ? o[t].p(u, c) : (Av(), as(o[h], 1, 1, () => { o[h] = null; - }), yv(), n = o[t], n ? n.p(u, c) : (n = o[t] = a[t](u), n.c()), ss(n, 1), n.m(r.parentNode, r)); + }), yv(), n = o[t], n ? n.p(u, c) : (n = o[t] = a[t](u), n.c()), ss(n, 1), n.m(i.parentNode, i)); }, i(u) { s || (ss(n), s = !0); @@ -21298,13 +21298,13 @@ function sS(i) { as(n), s = !1; }, d(u) { - u && Xs(r), o[t].d(u); + u && Xs(i), o[t].d(u); } }; } -function aS(i, e, t) { +function aS(r, e, t) { const n = ["href", "download"]; - let r = wm(e, n), { $$slots: s = {}, $$scope: a } = e; + let i = wm(e, n), { $$slots: s = {}, $$scope: a } = e; var o = this && this.__awaiter || function(m, g, p, b) { function y(v) { return v instanceof p ? v : new p(function(T) { @@ -21365,8 +21365,8 @@ function aS(i, e, t) { }); }); } - return i.$$set = (m) => { - e = Pl(Pl({}, e), X8(m)), t(6, r = wm(e, n)), "href" in m && t(0, l = m.href), "download" in m && t(1, u = m.download), "$$scope" in m && t(7, a = m.$$scope); + return r.$$set = (m) => { + e = Pl(Pl({}, e), X8(m)), t(6, i = wm(e, n)), "href" in m && t(0, l = m.href), "download" in m && t(1, u = m.download), "$$scope" in m && t(7, a = m.$$scope); }, [ l, u, @@ -21374,7 +21374,7 @@ function aS(i, e, t) { c, d, f, - r, + i, a, s ]; @@ -21423,14 +21423,14 @@ const { src_url_equal: yS, toggle_class: Rm } = window.__gradio__svelte__internal; -function bS(i) { - let e, t, n, r, s = [ +function bS(r) { + let e, t, n, i, s = [ { src: t = /*resolved_src*/ - i[0] + r[0] }, /*$$restProps*/ - i[1] + r[1] ], a = {}; for (let o = 0; o < s.length; o += 1) a = Cc(a, s[o]); @@ -21445,11 +21445,11 @@ function bS(i) { Lm(e, a), Rm(e, "svelte-kxeri3", !0); }, m(o, l) { - pS(o, e, l), n || (r = _S( + pS(o, e, l), n || (i = _S( e, "load", /*load_handler*/ - i[4] + r[4] ), n = !0); }, p(o, [l]) { @@ -21465,20 +21465,20 @@ function bS(i) { i: Im, o: Im, d(o) { - o && hS(e), n = !1, r(); + o && hS(e), n = !1, i(); } }; } -function ES(i, e, t) { +function ES(r, e, t) { const n = ["src"]; - let r = km(e, n), { src: s = void 0 } = e, a, o; + let i = km(e, n), { src: s = void 0 } = e, a, o; function l(u) { - uS.call(this, i, u); + uS.call(this, r, u); } - return i.$$set = (u) => { - e = Cc(Cc({}, e), fS(u)), t(1, r = km(e, n)), "src" in u && t(2, s = u.src); - }, i.$$.update = () => { - if (i.$$.dirty & /*src, latest_src*/ + return r.$$set = (u) => { + e = Cc(Cc({}, e), fS(u)), t(1, i = km(e, n)), "src" in u && t(2, s = u.src); + }, r.$$.update = () => { + if (r.$$.dirty & /*src, latest_src*/ 12) { t(0, a = s), t(3, o = s); const u = s; @@ -21486,7 +21486,7 @@ function ES(i, e, t) { o === u && t(0, a = c); }); } - }, [a, r, s, o, l]; + }, [a, i, s, o, l]; } class zh extends lS { constructor(e) { @@ -21521,34 +21521,34 @@ const { transition_out: YV } = window.__gradio__svelte__internal, { createEventDispatcher: XV, onMount: QV } = window.__gradio__svelte__internal; var Cm; -(function(i) { - i.LOAD = "LOAD", i.EXEC = "EXEC", i.FFPROBE = "FFPROBE", i.WRITE_FILE = "WRITE_FILE", i.READ_FILE = "READ_FILE", i.DELETE_FILE = "DELETE_FILE", i.RENAME = "RENAME", i.CREATE_DIR = "CREATE_DIR", i.LIST_DIR = "LIST_DIR", i.DELETE_DIR = "DELETE_DIR", i.ERROR = "ERROR", i.DOWNLOAD = "DOWNLOAD", i.PROGRESS = "PROGRESS", i.LOG = "LOG", i.MOUNT = "MOUNT", i.UNMOUNT = "UNMOUNT"; +(function(r) { + r.LOAD = "LOAD", r.EXEC = "EXEC", r.FFPROBE = "FFPROBE", r.WRITE_FILE = "WRITE_FILE", r.READ_FILE = "READ_FILE", r.DELETE_FILE = "DELETE_FILE", r.RENAME = "RENAME", r.CREATE_DIR = "CREATE_DIR", r.LIST_DIR = "LIST_DIR", r.DELETE_DIR = "DELETE_DIR", r.ERROR = "ERROR", r.DOWNLOAD = "DOWNLOAD", r.PROGRESS = "PROGRESS", r.LOG = "LOG", r.MOUNT = "MOUNT", r.UNMOUNT = "UNMOUNT"; })(Cm || (Cm = {})); var Fm; -(function(i) { - i.MEMFS = "MEMFS", i.NODEFS = "NODEFS", i.NODERAWFS = "NODERAWFS", i.IDBFS = "IDBFS", i.WORKERFS = "WORKERFS", i.PROXYFS = "PROXYFS"; +(function(r) { + r.MEMFS = "MEMFS", r.NODEFS = "NODEFS", r.NODERAWFS = "NODERAWFS", r.IDBFS = "IDBFS", r.WORKERFS = "WORKERFS", r.PROXYFS = "PROXYFS"; })(Fm || (Fm = {})); -function SS(i, { autoplay: e }) { +function SS(r, { autoplay: e }) { async function t() { - e && await i.play(); + e && await r.play(); } - return i.addEventListener("loadeddata", t), { + return r.addEventListener("loadeddata", t), { destroy() { - i.removeEventListener("loadeddata", t); + r.removeEventListener("loadeddata", t); } }; } -const oe = Number.isFinite || function(i) { - return typeof i == "number" && isFinite(i); -}, TS = Number.isSafeInteger || function(i) { - return typeof i == "number" && Math.abs(i) <= AS; +const oe = Number.isFinite || function(r) { + return typeof r == "number" && isFinite(r); +}, TS = Number.isSafeInteger || function(r) { + return typeof r == "number" && Math.abs(r) <= AS; }, AS = Number.MAX_SAFE_INTEGER || 9007199254740991; -let fe = /* @__PURE__ */ function(i) { - return i.NETWORK_ERROR = "networkError", i.MEDIA_ERROR = "mediaError", i.KEY_SYSTEM_ERROR = "keySystemError", i.MUX_ERROR = "muxError", i.OTHER_ERROR = "otherError", i; -}({}), G = /* @__PURE__ */ function(i) { - return i.KEY_SYSTEM_NO_KEYS = "keySystemNoKeys", i.KEY_SYSTEM_NO_ACCESS = "keySystemNoAccess", i.KEY_SYSTEM_NO_SESSION = "keySystemNoSession", i.KEY_SYSTEM_NO_CONFIGURED_LICENSE = "keySystemNoConfiguredLicense", i.KEY_SYSTEM_LICENSE_REQUEST_FAILED = "keySystemLicenseRequestFailed", i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED = "keySystemServerCertificateRequestFailed", i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED = "keySystemServerCertificateUpdateFailed", i.KEY_SYSTEM_SESSION_UPDATE_FAILED = "keySystemSessionUpdateFailed", i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED = "keySystemStatusOutputRestricted", i.KEY_SYSTEM_STATUS_INTERNAL_ERROR = "keySystemStatusInternalError", i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR = "keySystemDestroyMediaKeysError", i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR = "keySystemDestroyCloseSessionError", i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR = "keySystemDestroyRemoveSessionError", i.MANIFEST_LOAD_ERROR = "manifestLoadError", i.MANIFEST_LOAD_TIMEOUT = "manifestLoadTimeOut", i.MANIFEST_PARSING_ERROR = "manifestParsingError", i.MANIFEST_INCOMPATIBLE_CODECS_ERROR = "manifestIncompatibleCodecsError", i.LEVEL_EMPTY_ERROR = "levelEmptyError", i.LEVEL_LOAD_ERROR = "levelLoadError", i.LEVEL_LOAD_TIMEOUT = "levelLoadTimeOut", i.LEVEL_PARSING_ERROR = "levelParsingError", i.LEVEL_SWITCH_ERROR = "levelSwitchError", i.AUDIO_TRACK_LOAD_ERROR = "audioTrackLoadError", i.AUDIO_TRACK_LOAD_TIMEOUT = "audioTrackLoadTimeOut", i.SUBTITLE_LOAD_ERROR = "subtitleTrackLoadError", i.SUBTITLE_TRACK_LOAD_TIMEOUT = "subtitleTrackLoadTimeOut", i.FRAG_LOAD_ERROR = "fragLoadError", i.FRAG_LOAD_TIMEOUT = "fragLoadTimeOut", i.FRAG_DECRYPT_ERROR = "fragDecryptError", i.FRAG_PARSING_ERROR = "fragParsingError", i.FRAG_GAP = "fragGap", i.REMUX_ALLOC_ERROR = "remuxAllocError", i.KEY_LOAD_ERROR = "keyLoadError", i.KEY_LOAD_TIMEOUT = "keyLoadTimeOut", i.BUFFER_ADD_CODEC_ERROR = "bufferAddCodecError", i.BUFFER_INCOMPATIBLE_CODECS_ERROR = "bufferIncompatibleCodecsError", i.BUFFER_APPEND_ERROR = "bufferAppendError", i.BUFFER_APPENDING_ERROR = "bufferAppendingError", i.BUFFER_STALLED_ERROR = "bufferStalledError", i.BUFFER_FULL_ERROR = "bufferFullError", i.BUFFER_SEEK_OVER_HOLE = "bufferSeekOverHole", i.BUFFER_NUDGE_ON_STALL = "bufferNudgeOnStall", i.ASSET_LIST_LOAD_ERROR = "assetListLoadError", i.ASSET_LIST_LOAD_TIMEOUT = "assetListLoadTimeout", i.ASSET_LIST_PARSING_ERROR = "assetListParsingError", i.INTERSTITIAL_ASSET_ITEM_ERROR = "interstitialAssetItemError", i.INTERNAL_EXCEPTION = "internalException", i.INTERNAL_ABORTED = "aborted", i.ATTACH_MEDIA_ERROR = "attachMediaError", i.UNKNOWN = "unknown", i; -}({}), S = /* @__PURE__ */ function(i) { - return i.MEDIA_ATTACHING = "hlsMediaAttaching", i.MEDIA_ATTACHED = "hlsMediaAttached", i.MEDIA_DETACHING = "hlsMediaDetaching", i.MEDIA_DETACHED = "hlsMediaDetached", i.MEDIA_ENDED = "hlsMediaEnded", i.STALL_RESOLVED = "hlsStallResolved", i.BUFFER_RESET = "hlsBufferReset", i.BUFFER_CODECS = "hlsBufferCodecs", i.BUFFER_CREATED = "hlsBufferCreated", i.BUFFER_APPENDING = "hlsBufferAppending", i.BUFFER_APPENDED = "hlsBufferAppended", i.BUFFER_EOS = "hlsBufferEos", i.BUFFERED_TO_END = "hlsBufferedToEnd", i.BUFFER_FLUSHING = "hlsBufferFlushing", i.BUFFER_FLUSHED = "hlsBufferFlushed", i.MANIFEST_LOADING = "hlsManifestLoading", i.MANIFEST_LOADED = "hlsManifestLoaded", i.MANIFEST_PARSED = "hlsManifestParsed", i.LEVEL_SWITCHING = "hlsLevelSwitching", i.LEVEL_SWITCHED = "hlsLevelSwitched", i.LEVEL_LOADING = "hlsLevelLoading", i.LEVEL_LOADED = "hlsLevelLoaded", i.LEVEL_UPDATED = "hlsLevelUpdated", i.LEVEL_PTS_UPDATED = "hlsLevelPtsUpdated", i.LEVELS_UPDATED = "hlsLevelsUpdated", i.AUDIO_TRACKS_UPDATED = "hlsAudioTracksUpdated", i.AUDIO_TRACK_SWITCHING = "hlsAudioTrackSwitching", i.AUDIO_TRACK_SWITCHED = "hlsAudioTrackSwitched", i.AUDIO_TRACK_LOADING = "hlsAudioTrackLoading", i.AUDIO_TRACK_LOADED = "hlsAudioTrackLoaded", i.AUDIO_TRACK_UPDATED = "hlsAudioTrackUpdated", i.SUBTITLE_TRACKS_UPDATED = "hlsSubtitleTracksUpdated", i.SUBTITLE_TRACKS_CLEARED = "hlsSubtitleTracksCleared", i.SUBTITLE_TRACK_SWITCH = "hlsSubtitleTrackSwitch", i.SUBTITLE_TRACK_LOADING = "hlsSubtitleTrackLoading", i.SUBTITLE_TRACK_LOADED = "hlsSubtitleTrackLoaded", i.SUBTITLE_TRACK_UPDATED = "hlsSubtitleTrackUpdated", i.SUBTITLE_FRAG_PROCESSED = "hlsSubtitleFragProcessed", i.CUES_PARSED = "hlsCuesParsed", i.NON_NATIVE_TEXT_TRACKS_FOUND = "hlsNonNativeTextTracksFound", i.INIT_PTS_FOUND = "hlsInitPtsFound", i.FRAG_LOADING = "hlsFragLoading", i.FRAG_LOAD_EMERGENCY_ABORTED = "hlsFragLoadEmergencyAborted", i.FRAG_LOADED = "hlsFragLoaded", i.FRAG_DECRYPTED = "hlsFragDecrypted", i.FRAG_PARSING_INIT_SEGMENT = "hlsFragParsingInitSegment", i.FRAG_PARSING_USERDATA = "hlsFragParsingUserdata", i.FRAG_PARSING_METADATA = "hlsFragParsingMetadata", i.FRAG_PARSED = "hlsFragParsed", i.FRAG_BUFFERED = "hlsFragBuffered", i.FRAG_CHANGED = "hlsFragChanged", i.FPS_DROP = "hlsFpsDrop", i.FPS_DROP_LEVEL_CAPPING = "hlsFpsDropLevelCapping", i.MAX_AUTO_LEVEL_UPDATED = "hlsMaxAutoLevelUpdated", i.ERROR = "hlsError", i.DESTROYING = "hlsDestroying", i.KEY_LOADING = "hlsKeyLoading", i.KEY_LOADED = "hlsKeyLoaded", i.LIVE_BACK_BUFFER_REACHED = "hlsLiveBackBufferReached", i.BACK_BUFFER_REACHED = "hlsBackBufferReached", i.STEERING_MANIFEST_LOADED = "hlsSteeringManifestLoaded", i.ASSET_LIST_LOADING = "hlsAssetListLoading", i.ASSET_LIST_LOADED = "hlsAssetListLoaded", i.INTERSTITIALS_UPDATED = "hlsInterstitialsUpdated", i.INTERSTITIALS_BUFFERED_TO_BOUNDARY = "hlsInterstitialsBufferedToBoundary", i.INTERSTITIAL_ASSET_PLAYER_CREATED = "hlsInterstitialAssetPlayerCreated", i.INTERSTITIAL_STARTED = "hlsInterstitialStarted", i.INTERSTITIAL_ASSET_STARTED = "hlsInterstitialAssetStarted", i.INTERSTITIAL_ASSET_ENDED = "hlsInterstitialAssetEnded", i.INTERSTITIAL_ASSET_ERROR = "hlsInterstitialAssetError", i.INTERSTITIAL_ENDED = "hlsInterstitialEnded", i.INTERSTITIALS_PRIMARY_RESUMED = "hlsInterstitialsPrimaryResumed", i.PLAYOUT_LIMIT_REACHED = "hlsPlayoutLimitReached", i.EVENT_CUE_ENTER = "hlsEventCueEnter", i; +let fe = /* @__PURE__ */ function(r) { + return r.NETWORK_ERROR = "networkError", r.MEDIA_ERROR = "mediaError", r.KEY_SYSTEM_ERROR = "keySystemError", r.MUX_ERROR = "muxError", r.OTHER_ERROR = "otherError", r; +}({}), G = /* @__PURE__ */ function(r) { + return r.KEY_SYSTEM_NO_KEYS = "keySystemNoKeys", r.KEY_SYSTEM_NO_ACCESS = "keySystemNoAccess", r.KEY_SYSTEM_NO_SESSION = "keySystemNoSession", r.KEY_SYSTEM_NO_CONFIGURED_LICENSE = "keySystemNoConfiguredLicense", r.KEY_SYSTEM_LICENSE_REQUEST_FAILED = "keySystemLicenseRequestFailed", r.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED = "keySystemServerCertificateRequestFailed", r.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED = "keySystemServerCertificateUpdateFailed", r.KEY_SYSTEM_SESSION_UPDATE_FAILED = "keySystemSessionUpdateFailed", r.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED = "keySystemStatusOutputRestricted", r.KEY_SYSTEM_STATUS_INTERNAL_ERROR = "keySystemStatusInternalError", r.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR = "keySystemDestroyMediaKeysError", r.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR = "keySystemDestroyCloseSessionError", r.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR = "keySystemDestroyRemoveSessionError", r.MANIFEST_LOAD_ERROR = "manifestLoadError", r.MANIFEST_LOAD_TIMEOUT = "manifestLoadTimeOut", r.MANIFEST_PARSING_ERROR = "manifestParsingError", r.MANIFEST_INCOMPATIBLE_CODECS_ERROR = "manifestIncompatibleCodecsError", r.LEVEL_EMPTY_ERROR = "levelEmptyError", r.LEVEL_LOAD_ERROR = "levelLoadError", r.LEVEL_LOAD_TIMEOUT = "levelLoadTimeOut", r.LEVEL_PARSING_ERROR = "levelParsingError", r.LEVEL_SWITCH_ERROR = "levelSwitchError", r.AUDIO_TRACK_LOAD_ERROR = "audioTrackLoadError", r.AUDIO_TRACK_LOAD_TIMEOUT = "audioTrackLoadTimeOut", r.SUBTITLE_LOAD_ERROR = "subtitleTrackLoadError", r.SUBTITLE_TRACK_LOAD_TIMEOUT = "subtitleTrackLoadTimeOut", r.FRAG_LOAD_ERROR = "fragLoadError", r.FRAG_LOAD_TIMEOUT = "fragLoadTimeOut", r.FRAG_DECRYPT_ERROR = "fragDecryptError", r.FRAG_PARSING_ERROR = "fragParsingError", r.FRAG_GAP = "fragGap", r.REMUX_ALLOC_ERROR = "remuxAllocError", r.KEY_LOAD_ERROR = "keyLoadError", r.KEY_LOAD_TIMEOUT = "keyLoadTimeOut", r.BUFFER_ADD_CODEC_ERROR = "bufferAddCodecError", r.BUFFER_INCOMPATIBLE_CODECS_ERROR = "bufferIncompatibleCodecsError", r.BUFFER_APPEND_ERROR = "bufferAppendError", r.BUFFER_APPENDING_ERROR = "bufferAppendingError", r.BUFFER_STALLED_ERROR = "bufferStalledError", r.BUFFER_FULL_ERROR = "bufferFullError", r.BUFFER_SEEK_OVER_HOLE = "bufferSeekOverHole", r.BUFFER_NUDGE_ON_STALL = "bufferNudgeOnStall", r.ASSET_LIST_LOAD_ERROR = "assetListLoadError", r.ASSET_LIST_LOAD_TIMEOUT = "assetListLoadTimeout", r.ASSET_LIST_PARSING_ERROR = "assetListParsingError", r.INTERSTITIAL_ASSET_ITEM_ERROR = "interstitialAssetItemError", r.INTERNAL_EXCEPTION = "internalException", r.INTERNAL_ABORTED = "aborted", r.ATTACH_MEDIA_ERROR = "attachMediaError", r.UNKNOWN = "unknown", r; +}({}), S = /* @__PURE__ */ function(r) { + return r.MEDIA_ATTACHING = "hlsMediaAttaching", r.MEDIA_ATTACHED = "hlsMediaAttached", r.MEDIA_DETACHING = "hlsMediaDetaching", r.MEDIA_DETACHED = "hlsMediaDetached", r.MEDIA_ENDED = "hlsMediaEnded", r.STALL_RESOLVED = "hlsStallResolved", r.BUFFER_RESET = "hlsBufferReset", r.BUFFER_CODECS = "hlsBufferCodecs", r.BUFFER_CREATED = "hlsBufferCreated", r.BUFFER_APPENDING = "hlsBufferAppending", r.BUFFER_APPENDED = "hlsBufferAppended", r.BUFFER_EOS = "hlsBufferEos", r.BUFFERED_TO_END = "hlsBufferedToEnd", r.BUFFER_FLUSHING = "hlsBufferFlushing", r.BUFFER_FLUSHED = "hlsBufferFlushed", r.MANIFEST_LOADING = "hlsManifestLoading", r.MANIFEST_LOADED = "hlsManifestLoaded", r.MANIFEST_PARSED = "hlsManifestParsed", r.LEVEL_SWITCHING = "hlsLevelSwitching", r.LEVEL_SWITCHED = "hlsLevelSwitched", r.LEVEL_LOADING = "hlsLevelLoading", r.LEVEL_LOADED = "hlsLevelLoaded", r.LEVEL_UPDATED = "hlsLevelUpdated", r.LEVEL_PTS_UPDATED = "hlsLevelPtsUpdated", r.LEVELS_UPDATED = "hlsLevelsUpdated", r.AUDIO_TRACKS_UPDATED = "hlsAudioTracksUpdated", r.AUDIO_TRACK_SWITCHING = "hlsAudioTrackSwitching", r.AUDIO_TRACK_SWITCHED = "hlsAudioTrackSwitched", r.AUDIO_TRACK_LOADING = "hlsAudioTrackLoading", r.AUDIO_TRACK_LOADED = "hlsAudioTrackLoaded", r.AUDIO_TRACK_UPDATED = "hlsAudioTrackUpdated", r.SUBTITLE_TRACKS_UPDATED = "hlsSubtitleTracksUpdated", r.SUBTITLE_TRACKS_CLEARED = "hlsSubtitleTracksCleared", r.SUBTITLE_TRACK_SWITCH = "hlsSubtitleTrackSwitch", r.SUBTITLE_TRACK_LOADING = "hlsSubtitleTrackLoading", r.SUBTITLE_TRACK_LOADED = "hlsSubtitleTrackLoaded", r.SUBTITLE_TRACK_UPDATED = "hlsSubtitleTrackUpdated", r.SUBTITLE_FRAG_PROCESSED = "hlsSubtitleFragProcessed", r.CUES_PARSED = "hlsCuesParsed", r.NON_NATIVE_TEXT_TRACKS_FOUND = "hlsNonNativeTextTracksFound", r.INIT_PTS_FOUND = "hlsInitPtsFound", r.FRAG_LOADING = "hlsFragLoading", r.FRAG_LOAD_EMERGENCY_ABORTED = "hlsFragLoadEmergencyAborted", r.FRAG_LOADED = "hlsFragLoaded", r.FRAG_DECRYPTED = "hlsFragDecrypted", r.FRAG_PARSING_INIT_SEGMENT = "hlsFragParsingInitSegment", r.FRAG_PARSING_USERDATA = "hlsFragParsingUserdata", r.FRAG_PARSING_METADATA = "hlsFragParsingMetadata", r.FRAG_PARSED = "hlsFragParsed", r.FRAG_BUFFERED = "hlsFragBuffered", r.FRAG_CHANGED = "hlsFragChanged", r.FPS_DROP = "hlsFpsDrop", r.FPS_DROP_LEVEL_CAPPING = "hlsFpsDropLevelCapping", r.MAX_AUTO_LEVEL_UPDATED = "hlsMaxAutoLevelUpdated", r.ERROR = "hlsError", r.DESTROYING = "hlsDestroying", r.KEY_LOADING = "hlsKeyLoading", r.KEY_LOADED = "hlsKeyLoaded", r.LIVE_BACK_BUFFER_REACHED = "hlsLiveBackBufferReached", r.BACK_BUFFER_REACHED = "hlsBackBufferReached", r.STEERING_MANIFEST_LOADED = "hlsSteeringManifestLoaded", r.ASSET_LIST_LOADING = "hlsAssetListLoading", r.ASSET_LIST_LOADED = "hlsAssetListLoaded", r.INTERSTITIALS_UPDATED = "hlsInterstitialsUpdated", r.INTERSTITIALS_BUFFERED_TO_BOUNDARY = "hlsInterstitialsBufferedToBoundary", r.INTERSTITIAL_ASSET_PLAYER_CREATED = "hlsInterstitialAssetPlayerCreated", r.INTERSTITIAL_STARTED = "hlsInterstitialStarted", r.INTERSTITIAL_ASSET_STARTED = "hlsInterstitialAssetStarted", r.INTERSTITIAL_ASSET_ENDED = "hlsInterstitialAssetEnded", r.INTERSTITIAL_ASSET_ERROR = "hlsInterstitialAssetError", r.INTERSTITIAL_ENDED = "hlsInterstitialEnded", r.INTERSTITIALS_PRIMARY_RESUMED = "hlsInterstitialsPrimaryResumed", r.PLAYOUT_LIMIT_REACHED = "hlsPlayoutLimitReached", r.EVENT_CUE_ENTER = "hlsEventCueEnter", r; }({}); var Be = { MANIFEST: "manifest", @@ -21582,21 +21582,21 @@ class xs { } } class xS { - constructor(e, t, n, r = 100) { - this.defaultEstimate_ = void 0, this.minWeight_ = void 0, this.minDelayMs_ = void 0, this.slow_ = void 0, this.fast_ = void 0, this.defaultTTFB_ = void 0, this.ttfb_ = void 0, this.defaultEstimate_ = n, this.minWeight_ = 1e-3, this.minDelayMs_ = 50, this.slow_ = new xs(e), this.fast_ = new xs(t), this.defaultTTFB_ = r, this.ttfb_ = new xs(e); + constructor(e, t, n, i = 100) { + this.defaultEstimate_ = void 0, this.minWeight_ = void 0, this.minDelayMs_ = void 0, this.slow_ = void 0, this.fast_ = void 0, this.defaultTTFB_ = void 0, this.ttfb_ = void 0, this.defaultEstimate_ = n, this.minWeight_ = 1e-3, this.minDelayMs_ = 50, this.slow_ = new xs(e), this.fast_ = new xs(t), this.defaultTTFB_ = i, this.ttfb_ = new xs(e); } update(e, t) { const { slow_: n, - fast_: r, + fast_: i, ttfb_: s } = this; - n.halfLife !== e && (this.slow_ = new xs(e, n.getEstimate(), n.getTotalWeight())), r.halfLife !== t && (this.fast_ = new xs(t, r.getEstimate(), r.getTotalWeight())), s.halfLife !== e && (this.ttfb_ = new xs(e, s.getEstimate(), s.getTotalWeight())); + n.halfLife !== e && (this.slow_ = new xs(e, n.getEstimate(), n.getTotalWeight())), i.halfLife !== t && (this.fast_ = new xs(t, i.getEstimate(), i.getTotalWeight())), s.halfLife !== e && (this.ttfb_ = new xs(e, s.getEstimate(), s.getTotalWeight())); } sample(e, t) { e = Math.max(e, this.minDelayMs_); - const n = 8 * t, r = e / 1e3, s = n / r; - this.fast_.sample(r, s), this.slow_.sample(r, s); + const n = 8 * t, i = e / 1e3, s = n / i; + this.fast_.sample(i, s), this.slow_.sample(i, s); } sampleTTFB(e) { const t = e / 1e3, n = Math.sqrt(2) * Math.exp(-Math.pow(t, 2) / 2); @@ -21617,89 +21617,89 @@ class xS { destroy() { } } -function wS(i, e, t) { - return (e = kS(e)) in i ? Object.defineProperty(i, e, { +function wS(r, e, t) { + return (e = kS(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 - }) : i[e] = t, i; + }) : r[e] = t, r; } function Qe() { - return Qe = Object.assign ? Object.assign.bind() : function(i) { + return Qe = Object.assign ? Object.assign.bind() : function(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var n in t) ({}).hasOwnProperty.call(t, n) && (i[n] = t[n]); + for (var n in t) ({}).hasOwnProperty.call(t, n) && (r[n] = t[n]); } - return i; + return r; }, Qe.apply(null, arguments); } -function Pm(i, e) { - var t = Object.keys(i); +function Pm(r, e) { + var t = Object.keys(r); if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(i); - e && (n = n.filter(function(r) { - return Object.getOwnPropertyDescriptor(i, r).enumerable; + var n = Object.getOwnPropertySymbols(r); + e && (n = n.filter(function(i) { + return Object.getOwnPropertyDescriptor(r, i).enumerable; })), t.push.apply(t, n); } return t; } -function je(i) { +function je(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? Pm(Object(t), !0).forEach(function(n) { - wS(i, n, t[n]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : Pm(Object(t)).forEach(function(n) { - Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n)); + wS(r, n, t[n]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : Pm(Object(t)).forEach(function(n) { + Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } - return i; + return r; } -function DS(i, e) { - if (typeof i != "object" || !i) return i; - var t = i[Symbol.toPrimitive]; +function DS(r, e) { + if (typeof r != "object" || !r) return r; + var t = r[Symbol.toPrimitive]; if (t !== void 0) { - var n = t.call(i, e); + var n = t.call(r, e); if (typeof n != "object") return n; throw new TypeError("@@toPrimitive must return a primitive value."); } - return (e === "string" ? String : Number)(i); + return (e === "string" ? String : Number)(r); } -function kS(i) { - var e = DS(i, "string"); +function kS(r) { + var e = DS(r, "string"); return typeof e == "symbol" ? e : e + ""; } -class ni { +class nr { constructor(e, t) { this.trace = void 0, this.debug = void 0, this.log = void 0, this.warn = void 0, this.info = void 0, this.error = void 0; const n = `[${e}]:`; - this.trace = vr, this.debug = t.debug.bind(null, n), this.log = t.log.bind(null, n), this.warn = t.warn.bind(null, n), this.info = t.info.bind(null, n), this.error = t.error.bind(null, n); + this.trace = vi, this.debug = t.debug.bind(null, n), this.log = t.log.bind(null, n), this.warn = t.warn.bind(null, n), this.info = t.info.bind(null, n), this.error = t.error.bind(null, n); } } -const vr = function() { +const vi = function() { }, IS = { - trace: vr, - debug: vr, - log: vr, - warn: vr, - info: vr, - error: vr + trace: vi, + debug: vi, + log: vi, + warn: vi, + info: vi, + error: vi }; function Fc() { return Qe({}, IS); } -function LS(i, e) { - const t = self.console[i]; - return t ? t.bind(self.console, `${e ? "[" + e + "] " : ""}[${i}] >`) : vr; +function LS(r, e) { + const t = self.console[r]; + return t ? t.bind(self.console, `${e ? "[" + e + "] " : ""}[${r}] >`) : vi; } -function Mm(i, e, t) { - return e[i] ? e[i].bind(e) : LS(i, t); +function Mm(r, e, t) { + return e[r] ? e[r].bind(e) : LS(r, t); } const Pc = Fc(); -function RS(i, e, t) { +function RS(r, e, t) { const n = Fc(); - if (typeof console == "object" && i === !0 || typeof i == "object") { - const r = [ + if (typeof console == "object" && r === !0 || typeof r == "object") { + const i = [ // Remove out from list here to hard-disable a log-level // 'trace', "debug", @@ -21708,45 +21708,45 @@ function RS(i, e, t) { "warn", "error" ]; - r.forEach((s) => { - n[s] = Mm(s, i, t); + i.forEach((s) => { + n[s] = Mm(s, r, t); }); try { n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`); } catch { return Fc(); } - r.forEach((s) => { - Pc[s] = Mm(s, i); + i.forEach((s) => { + Pc[s] = Mm(s, r); }); } else Qe(Pc, n); return n; } const We = Pc; -function kr(i = !0) { - return typeof self > "u" ? void 0 : (i || !self.MediaSource) && self.ManagedMediaSource || self.MediaSource || self.WebKitMediaSource; +function ki(r = !0) { + return typeof self > "u" ? void 0 : (r || !self.MediaSource) && self.ManagedMediaSource || self.MediaSource || self.WebKitMediaSource; } -function CS(i) { - return typeof self < "u" && i === self.ManagedMediaSource; +function CS(r) { + return typeof self < "u" && r === self.ManagedMediaSource; } -function wv(i, e) { - const t = Object.keys(i), n = Object.keys(e), r = t.length, s = n.length; - return !r || !s || r === s && !t.some((a) => n.indexOf(a) === -1); +function wv(r, e) { + const t = Object.keys(r), n = Object.keys(e), i = t.length, s = n.length; + return !i || !s || i === s && !t.some((a) => n.indexOf(a) === -1); } -function On(i, e = !1) { +function On(r, e = !1) { if (typeof TextDecoder < "u") { - const u = new TextDecoder("utf-8").decode(i); + const u = new TextDecoder("utf-8").decode(r); if (e) { const c = u.indexOf("\0"); return c !== -1 ? u.substring(0, c) : u; } return u.replace(/\0/g, ""); } - const t = i.length; - let n, r, s, a = "", o = 0; + const t = r.length; + let n, i, s, a = "", o = 0; for (; o < t; ) { - if (n = i[o++], n === 0 && e) + if (n = r[o++], n === 0 && e) return a; if (n === 0 || n === 3) continue; @@ -21763,34 +21763,34 @@ function On(i, e = !1) { break; case 12: case 13: - r = i[o++], a += String.fromCharCode((n & 31) << 6 | r & 63); + i = r[o++], a += String.fromCharCode((n & 31) << 6 | i & 63); break; case 14: - r = i[o++], s = i[o++], a += String.fromCharCode((n & 15) << 12 | (r & 63) << 6 | (s & 63) << 0); + i = r[o++], s = r[o++], a += String.fromCharCode((n & 15) << 12 | (i & 63) << 6 | (s & 63) << 0); break; } } return a; } -function Kt(i) { +function Kt(r) { let e = ""; - for (let t = 0; t < i.length; t++) { - let n = i[t].toString(16); + for (let t = 0; t < r.length; t++) { + let n = r[t].toString(16); n.length < 2 && (n = "0" + n), e += n; } return e; } -function Dv(i) { - return Uint8Array.from(i.replace(/^0x/, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")).buffer; +function Dv(r) { + return Uint8Array.from(r.replace(/^0x/, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")).buffer; } -function FS(i) { - return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i; +function FS(r) { + return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r; } var ku = { exports: {} }, Om; function PS() { - return Om || (Om = 1, function(i, e) { + return Om || (Om = 1, function(r, e) { (function(t) { - var n = /^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/, r = /^(?=([^\/?#]*))\1([^]*)$/, s = /(?:\/|^)\.(?=\/)/g, a = /(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g, o = { + var n = /^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/, i = /^(?=([^\/?#]*))\1([^]*)$/, s = /(?:\/|^)\.(?=\/)/g, a = /(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g, o = { // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or // // E.g // With opts.alwaysNormalize = false (default, spec compliant) @@ -21817,7 +21817,7 @@ function PS() { if (!f) throw new Error("Error trying to parse base URL."); if (!f.netLoc && f.path && f.path[0] !== "/") { - var m = r.exec(f.path); + var m = i.exec(f.path); f.netLoc = m[1], f.path = m[2]; } f.netLoc && !f.path && (f.path = "/"); @@ -21860,7 +21860,7 @@ function PS() { return l.scheme + l.netLoc + l.path + l.params + l.query + l.fragment; } }; - i.exports = o; + r.exports = o; })(); }(ku)), ku.exports; } @@ -21895,8 +21895,8 @@ class kv { // setByteRange converts a EXT-X-BYTERANGE attribute into a two element array setByteRange(e, t) { const n = e.split("@", 2); - let r; - n.length === 1 ? r = (t == null ? void 0 : t.byteRangeEndOffset) || 0 : r = parseInt(n[1]), this._byteRange = [r, parseInt(n[0]) + r]; + let i; + n.length === 1 ? i = (t == null ? void 0 : t.byteRangeEndOffset) || 0 : i = parseInt(n[1]), this._byteRange = [i, parseInt(n[0]) + i]; } get baseurl() { return this.base.url; @@ -21947,8 +21947,8 @@ class kv { e[Je.AUDIO] = null, e[Je.VIDEO] = null, e[Je.AUDIOVIDEO] = null; } } -function Tt(i) { - return i.sn !== "initSegment"; +function Tt(r) { + return r.sn !== "initSegment"; } class Iu extends kv { constructor(e, t) { @@ -21985,8 +21985,8 @@ class Iu extends kv { else if (!((e = this._decryptdata) != null && e.keyId)) { const n = Object.keys(t); if (n.length === 1) { - const r = this._decryptdata = t[n[0]] || null; - r && (this._decryptdata = r.getDecryptData(this.sn, t)); + const i = this._decryptdata = t[n[0]] || null; + i && (this._decryptdata = i.getDecryptData(this.sn, t)); } } return this._decryptdata; @@ -22006,8 +22006,8 @@ class Iu extends kv { return !0; if (this.levelkeys) { var t; - const n = Object.keys(this.levelkeys), r = n.length; - if (r > 1 || r === 1 && (t = this.levelkeys[n[0]]) != null && t.encrypted) + const n = Object.keys(this.levelkeys), i = n.length; + if (i > 1 || i === 1 && (t = this.levelkeys[n[0]]) != null && t.encrypted) return !0; } return !1; @@ -22044,15 +22044,15 @@ class Iu extends kv { const t = this.levelkeys; if (t) { var n; - const r = t[e]; - r && !((n = this._decryptdata) != null && n.keyId) && (this._decryptdata = r.getDecryptData(this.sn, t)); + const i = t[e]; + i && !((n = this._decryptdata) != null && n.keyId) && (this._decryptdata = i.getDecryptData(this.sn, t)); } } abortRequests() { var e, t; (e = this.loader) == null || e.abort(), (t = this.keyLoader) == null || t.abort(); } - setElementaryStreamInfo(e, t, n, r, s, a = !1) { + setElementaryStreamInfo(e, t, n, i, s, a = !1) { const { elementaryStreams: o } = this, l = o[e]; @@ -22060,18 +22060,18 @@ class Iu extends kv { o[e] = { startPTS: t, endPTS: n, - startDTS: r, + startDTS: i, endDTS: s, partial: a }; return; } - l.startPTS = Math.min(l.startPTS, t), l.endPTS = Math.max(l.endPTS, n), l.startDTS = Math.min(l.startDTS, r), l.endDTS = Math.max(l.endDTS, s); + l.startPTS = Math.min(l.startPTS, t), l.endPTS = Math.max(l.endPTS, n), l.startDTS = Math.min(l.startDTS, i), l.endDTS = Math.max(l.endDTS, s); } } class MS extends kv { - constructor(e, t, n, r, s) { - super(n), this.fragOffset = 0, this.duration = 0, this.gap = !1, this.independent = !1, this.relurl = void 0, this.fragment = void 0, this.index = void 0, this.duration = e.decimalFloatingPoint("DURATION"), this.gap = e.bool("GAP"), this.independent = e.bool("INDEPENDENT"), this.relurl = e.enumeratedString("URI"), this.fragment = t, this.index = r; + constructor(e, t, n, i, s) { + super(n), this.fragOffset = 0, this.duration = 0, this.gap = !1, this.independent = !1, this.relurl = void 0, this.fragment = void 0, this.index = void 0, this.duration = e.decimalFloatingPoint("DURATION"), this.gap = e.bool("GAP"), this.independent = e.bool("INDEPENDENT"), this.relurl = e.enumeratedString("URI"), this.fragment = t, this.index = i; const a = e.enumeratedString("BYTERANGE"); a && this.setByteRange(a, s), s && (this.fragOffset = s.fragOffset + s.duration); } @@ -22088,16 +22088,16 @@ class MS extends kv { return !!(e.audio || e.video || e.audiovideo); } } -function Iv(i, e) { - const t = Object.getPrototypeOf(i); +function Iv(r, e) { + const t = Object.getPrototypeOf(r); if (t) { const n = Object.getOwnPropertyDescriptor(t, e); return n || Iv(t, e); } } -function OS(i, e) { - const t = Iv(i, e); - t && (t.enumerable = !0, Object.defineProperty(i, e, t)); +function OS(r, e) { + const t = Iv(r, e); + t && (t.enumerable = !0, Object.defineProperty(r, e, t)); } const Bm = Math.pow(2, 32) - 1, BS = [].push, Lv = { video: 1, @@ -22105,76 +22105,76 @@ const Bm = Math.pow(2, 32) - 1, BS = [].push, Lv = { id3: 3, text: 4 }; -function Mt(i) { - return String.fromCharCode.apply(null, i); +function Mt(r) { + return String.fromCharCode.apply(null, r); } -function Rv(i, e) { - const t = i[e] << 8 | i[e + 1]; +function Rv(r, e) { + const t = r[e] << 8 | r[e + 1]; return t < 0 ? 65536 + t : t; } -function we(i, e) { - const t = Cv(i, e); +function we(r, e) { + const t = Cv(r, e); return t < 0 ? 4294967296 + t : t; } -function Nm(i, e) { - let t = we(i, e); - return t *= Math.pow(2, 32), t += we(i, e + 4), t; +function Nm(r, e) { + let t = we(r, e); + return t *= Math.pow(2, 32), t += we(r, e + 4), t; } -function Cv(i, e) { - return i[e] << 24 | i[e + 1] << 16 | i[e + 2] << 8 | i[e + 3]; +function Cv(r, e) { + return r[e] << 24 | r[e + 1] << 16 | r[e + 2] << 8 | r[e + 3]; } -function NS(i) { - const e = i.byteLength; +function NS(r) { + const e = r.byteLength; for (let t = 0; t < e; ) { - const n = we(i, t); - if (n > 8 && i[t + 4] === 109 && i[t + 5] === 111 && i[t + 6] === 111 && i[t + 7] === 102) + const n = we(r, t); + if (n > 8 && r[t + 4] === 109 && r[t + 5] === 111 && r[t + 6] === 111 && r[t + 7] === 102) return !0; t = n > 1 ? t + n : e; } return !1; } -function Pe(i, e) { +function Pe(r, e) { const t = []; if (!e.length) return t; - const n = i.byteLength; - for (let r = 0; r < n; ) { - const s = we(i, r), a = Mt(i.subarray(r + 4, r + 8)), o = s > 1 ? r + s : n; + const n = r.byteLength; + for (let i = 0; i < n; ) { + const s = we(r, i), a = Mt(r.subarray(i + 4, i + 8)), o = s > 1 ? i + s : n; if (a === e[0]) if (e.length === 1) - t.push(i.subarray(r + 8, o)); + t.push(r.subarray(i + 8, o)); else { - const l = Pe(i.subarray(r + 8, o), e.slice(1)); + const l = Pe(r.subarray(i + 8, o), e.slice(1)); l.length && BS.apply(t, l); } - r = o; + i = o; } return t; } -function $S(i) { - const e = [], t = i[0]; +function $S(r) { + const e = [], t = r[0]; let n = 8; - const r = we(i, n); + const i = we(r, n); n += 4; let s = 0, a = 0; - t === 0 ? (s = we(i, n), a = we(i, n + 4), n += 8) : (s = Nm(i, n), a = Nm(i, n + 8), n += 16), n += 2; - let o = i.length + a; - const l = Rv(i, n); + t === 0 ? (s = we(r, n), a = we(r, n + 4), n += 8) : (s = Nm(r, n), a = Nm(r, n + 8), n += 16), n += 2; + let o = r.length + a; + const l = Rv(r, n); n += 2; for (let u = 0; u < l; u++) { let c = n; - const h = we(i, c); + const h = we(r, c); c += 4; const d = h & 2147483647; if ((h & 2147483648) >>> 31 === 1) return We.warn("SIDX has hierarchical references (not supported)"), null; - const m = we(i, c); + const m = we(r, c); c += 4, e.push({ referenceSize: d, subsegmentDuration: m, // unscaled info: { - duration: m / r, + duration: m / i, start: o, end: o + d - 1 } @@ -22182,16 +22182,16 @@ function $S(i) { } return { earliestPresentationTime: s, - timescale: r, + timescale: i, version: t, referencesCount: l, references: e }; } -function Fv(i) { - const e = [], t = Pe(i, ["moov", "trak"]); - for (let r = 0; r < t.length; r++) { - const s = t[r], a = Pe(s, ["tkhd"])[0]; +function Fv(r) { + const e = [], t = Pe(r, ["moov", "trak"]); + for (let i = 0; i < t.length; i++) { + const s = t[i], a = Pe(s, ["tkhd"])[0]; if (a) { let o = a[0]; const l = we(a, o === 0 ? 12 : 20), u = Pe(s, ["mdia", "mdhd"])[0]; @@ -22219,17 +22219,17 @@ function Fv(i) { } } } - return Pe(i, ["moov", "mvex", "trex"]).forEach((r) => { - const s = we(r, 4), a = e[s]; + return Pe(r, ["moov", "mvex", "trex"]).forEach((i) => { + const s = we(i, 4), a = e[s]; a && (a.default = { - duration: we(r, 12), - flags: we(r, 20) + duration: we(i, 12), + flags: we(i, 20) }); }), e; } -function US(i) { - const e = i.subarray(8), t = e.subarray(86), n = Mt(e.subarray(4, 8)); - let r = n, s; +function US(r) { + const e = r.subarray(8), t = e.subarray(86), n = Mt(e.subarray(4, 8)); + let i = n, s; const a = n === "enca" || n === "encv"; if (a) { const u = Pe(e, [n])[0].subarray(n === "enca" ? 28 : 78); @@ -22239,19 +22239,19 @@ function US(i) { const f = Mt(d.subarray(4, 8)); if (f === "cbcs" || f === "cenc") { const m = Pe(h, ["frma"])[0]; - m && (r = Mt(m)); + m && (i = Mt(m)); } } }); } - const o = r; - switch (r) { + const o = i; + switch (i) { case "avc1": case "avc2": case "avc3": case "avc4": { const l = Pe(t, ["avcC"])[0]; - l && l.length > 3 && (r += "." + Bo(l[1]) + Bo(l[2]) + Bo(l[3]), s = Oo(o === "avc1" ? "dva1" : "dvav", t)); + l && l.length > 3 && (i += "." + Bo(l[1]) + Bo(l[2]) + Bo(l[3]), s = Oo(o === "avc1" ? "dva1" : "dvav", t)); break; } case "mp4a": { @@ -22267,7 +22267,7 @@ function US(i) { c = Lu(u, c); const d = u[c++]; if (d === 64) - r += "." + Bo(d); + i += "." + Bo(d); else break; if (c += 12, u[c++] !== 5) @@ -22275,7 +22275,7 @@ function US(i) { c = Lu(u, c); const f = u[c++]; let m = (f & 248) >> 3; - m === 31 && (m += 1 + ((f & 7) << 3) + ((u[c] & 224) >> 5)), r += "." + m; + m === 31 && (m += 1 + ((f & 7) << 3) + ((u[c] & 224) >> 5)), i += "." + m; } break; } @@ -22284,13 +22284,13 @@ function US(i) { const l = Pe(t, ["hvcC"])[0]; if (l && l.length > 12) { const u = l[1], c = ["", "A", "B", "C"][u >> 6], h = u & 31, d = we(l, 2), f = (u & 32) >> 5 ? "H" : "L", m = l[12], g = l.subarray(6, 12); - r += "." + c + h, r += "." + HS(d).toString(16).toUpperCase(), r += "." + f + m; + i += "." + c + h, i += "." + HS(d).toString(16).toUpperCase(), i += "." + f + m; let p = ""; for (let b = g.length; b--; ) { const y = g[b]; (y || p) && (p = "." + y.toString(16).toUpperCase() + p); } - r += p; + i += p; } s = Oo(o == "hev1" ? "dvhe" : "dvh1", t); break; @@ -22300,14 +22300,14 @@ function US(i) { case "dvav": case "dva1": case "dav1": { - r = Oo(r, t) || r; + i = Oo(i, t) || i; break; } case "vp09": { const l = Pe(t, ["vpcC"])[0]; if (l && l.length > 6) { const u = l[4], c = l[5], h = l[6] >> 4 & 15; - r += "." + wi(u) + "." + wi(c) + "." + wi(h); + i += "." + wr(u) + "." + wr(c) + "." + wr(h); } break; } @@ -22315,60 +22315,60 @@ function US(i) { const l = Pe(t, ["av1C"])[0]; if (l && l.length > 2) { const u = l[1] >>> 5, c = l[1] & 31, h = l[2] >>> 7 ? "H" : "M", d = (l[2] & 64) >> 6, f = (l[2] & 32) >> 5, m = u === 2 && d ? f ? 12 : 10 : d ? 10 : 8, g = (l[2] & 16) >> 4, p = (l[2] & 8) >> 3, b = (l[2] & 4) >> 2, y = l[2] & 3; - r += "." + u + "." + wi(c) + h + "." + wi(m) + "." + g + "." + p + b + y + "." + wi(1) + "." + wi(1) + "." + wi(1) + "." + 0, s = Oo("dav1", t); + i += "." + u + "." + wr(c) + h + "." + wr(m) + "." + g + "." + p + b + y + "." + wr(1) + "." + wr(1) + "." + wr(1) + "." + 0, s = Oo("dav1", t); } break; } } return { - codec: r, + codec: i, encrypted: a, supplemental: s }; } -function Oo(i, e) { +function Oo(r, e) { const t = Pe(e, ["dvvC"]), n = t.length ? t[0] : Pe(e, ["dvcC"])[0]; if (n) { - const r = n[2] >> 1 & 127, s = n[2] << 5 & 32 | n[3] >> 3 & 31; - return i + "." + wi(r) + "." + wi(s); + const i = n[2] >> 1 & 127, s = n[2] << 5 & 32 | n[3] >> 3 & 31; + return r + "." + wr(i) + "." + wr(s); } } -function HS(i) { +function HS(r) { let e = 0; for (let t = 0; t < 32; t++) - e |= (i >> t & 1) << 31 - t; + e |= (r >> t & 1) << 31 - t; return e >>> 0; } -function Lu(i, e) { +function Lu(r, e) { const t = e + 5; - for (; i[e++] & 128 && e < t; ) + for (; r[e++] & 128 && e < t; ) ; return e; } -function Bo(i) { - return ("0" + i.toString(16).toUpperCase()).slice(-2); +function Bo(r) { + return ("0" + r.toString(16).toUpperCase()).slice(-2); } -function wi(i) { - return (i < 10 ? "0" : "") + i; +function wr(r) { + return (r < 10 ? "0" : "") + r; } -function GS(i, e) { - if (!i || !e) +function GS(r, e) { + if (!r || !e) return; const t = e.keyId; - t && e.isCommonEncryption && Pv(i, (n, r) => { + t && e.isCommonEncryption && Pv(r, (n, i) => { const s = n.subarray(8, 24); - s.some((a) => a !== 0) || (We.log(`[eme] Patching keyId in 'enc${r ? "a" : "v"}>sinf>>tenc' box: ${Kt(s)} -> ${Kt(t)}`), n.set(t, 8)); + s.some((a) => a !== 0) || (We.log(`[eme] Patching keyId in 'enc${i ? "a" : "v"}>sinf>>tenc' box: ${Kt(s)} -> ${Kt(t)}`), n.set(t, 8)); }); } -function zS(i) { +function zS(r) { const e = []; - return Pv(i, (t) => e.push(t.subarray(8, 24))), e; + return Pv(r, (t) => e.push(t.subarray(8, 24))), e; } -function Pv(i, e) { - Pe(i, ["moov", "trak"]).forEach((n) => { - const r = Pe(n, ["mdia", "minf", "stbl", "stsd"])[0]; - if (!r) return; - const s = r.subarray(8); +function Pv(r, e) { + Pe(r, ["moov", "trak"]).forEach((n) => { + const i = Pe(n, ["mdia", "minf", "stbl", "stsd"])[0]; + if (!i) return; + const s = i.subarray(8); let a = Pe(s, ["enca"]); const o = a.length > 0; o || (a = Pe(s, ["encv"])), a.forEach((l) => { @@ -22380,21 +22380,21 @@ function Pv(i, e) { }); }); } -function Mv(i) { - const e = Pe(i, ["schm"])[0]; +function Mv(r) { + const e = Pe(r, ["schm"])[0]; if (e) { const t = Mt(e.subarray(4, 8)); if (t === "cbcs" || t === "cenc") { - const n = Pe(i, ["schi", "tenc"])[0]; + const n = Pe(r, ["schi", "tenc"])[0]; if (n) return n; } } } -function qS(i, e, t) { - const n = {}, r = Pe(i, ["moof", "traf"]); - for (let s = 0; s < r.length; s++) { - const a = r[s], o = Pe(a, ["tfhd"])[0], l = we(o, 4), u = e[l]; +function qS(r, e, t) { + const n = {}, i = Pe(r, ["moof", "traf"]); + for (let s = 0; s < i.length; s++) { + const a = i[s], o = Pe(a, ["tfhd"])[0], l = we(o, 4), u = e[l]; if (!u) continue; n[l] || (n[l] = { @@ -22428,7 +22428,7 @@ function qS(i, e, t) { } if (!Object.keys(n).some((s) => n[s].duration)) { let s = 1 / 0, a = 0; - const o = Pe(i, ["sidx"]); + const o = Pe(r, ["sidx"]); for (let l = 0; l < o.length; l++) { const u = $S(o[l]); if (u != null && u.references) { @@ -22443,22 +22443,22 @@ function qS(i, e, t) { } return n; } -function VS(i) { +function VS(r) { const e = { valid: null, remainder: null - }, t = Pe(i, ["moof"]); + }, t = Pe(r, ["moof"]); if (t.length < 2) - return e.remainder = i, e; + return e.remainder = r, e; const n = t[t.length - 1]; - return e.valid = i.slice(0, n.byteOffset - 8), e.remainder = i.slice(n.byteOffset - 8), e; + return e.valid = r.slice(0, n.byteOffset - 8), e.remainder = r.slice(n.byteOffset - 8), e; } -function Zn(i, e) { - const t = new Uint8Array(i.length + e.length); - return t.set(i), t.set(e, i.length), t; +function Zn(r, e) { + const t = new Uint8Array(r.length + e.length); + return t.set(r), t.set(e, r.length), t; } -function $m(i, e) { - const t = [], n = e.samples, r = e.timescale, s = e.id; +function $m(r, e) { + const t = [], n = e.samples, i = e.timescale, s = e.id; let a = !1; return Pe(n, ["moof"]).map((l) => { const u = l.byteOffset - 8; @@ -22466,9 +22466,9 @@ function $m(i, e) { const d = Pe(h, ["tfdt"]).map((f) => { const m = f[0]; let g = we(f, 4); - return m === 1 && (g *= Math.pow(2, 32), g += we(f, 8)), g / r; + return m === 1 && (g *= Math.pow(2, 32), g += we(f, 8)), g / i; })[0]; - return d !== void 0 && (i = d), Pe(h, ["tfhd"]).map((f) => { + return d !== void 0 && (r = d), Pe(h, ["tfhd"]).map((f) => { const m = we(f, 4), g = we(f, 0) & 16777215, p = (g & 1) !== 0, b = (g & 2) !== 0, y = (g & 8) !== 0; let v = 0; const T = (g & 16) !== 0; @@ -22495,51 +22495,51 @@ function $m(i, e) { const ge = we(n, se); if (se += 4, KS(a, n[se])) { const xe = n.subarray(se, se + ge); - Kh(xe, a ? 2 : 1, i + ne / r, t); + Kh(xe, a ? 2 : 1, r + ne / i, t); } se += ge, K += ge + 4; } } - i += J / r; + r += J / i; } })); }); }); }), t; } -function A0(i) { - if (!i) +function A0(r) { + if (!r) return !1; - const e = i.substring(0, 4); + const e = r.substring(0, 4); return e === "hvc1" || e === "hev1" || // Dolby Vision e === "dvh1" || e === "dvhe"; } -function KS(i, e) { - if (i) { +function KS(r, e) { + if (r) { const t = e >> 1 & 63; return t === 39 || t === 40; } else return (e & 31) === 6; } -function Kh(i, e, t, n) { - const r = Ov(i); +function Kh(r, e, t, n) { + const i = Ov(r); let s = 0; s += e; let a = 0, o = 0, l = 0; - for (; s < r.length; ) { + for (; s < i.length; ) { a = 0; do { - if (s >= r.length) + if (s >= i.length) break; - l = r[s++], a += l; + l = i[s++], a += l; } while (l === 255); o = 0; do { - if (s >= r.length) + if (s >= i.length) break; - l = r[s++], o += l; + l = i[s++], o += l; } while (l === 255); - const u = r.length - s; + const u = i.length - s; let c = s; if (o < u) s += o; @@ -22548,18 +22548,18 @@ function Kh(i, e, t, n) { break; } if (a === 4) { - if (r[c++] === 181) { - const d = Rv(r, c); + if (i[c++] === 181) { + const d = Rv(i, c); if (c += 2, d === 49) { - const f = we(r, c); + const f = we(i, c); if (c += 4, f === 1195456820) { - const m = r[c++]; + const m = i[c++]; if (m === 3) { - const g = r[c++], p = 31 & g, b = 64 & g, y = b ? 2 + p * 3 : 0, v = new Uint8Array(y); + const g = i[c++], p = 31 & g, b = 64 & g, y = b ? 2 + p * 3 : 0, v = new Uint8Array(y); if (b) { v[0] = g; for (let T = 1; T < y; T++) - v[T] = r[c++]; + v[T] = i[c++]; } n.push({ type: m, @@ -22574,12 +22574,12 @@ function Kh(i, e, t, n) { } else if (a === 5 && o > 16) { const h = []; for (let m = 0; m < 16; m++) { - const g = r[c++].toString(16); + const g = i[c++].toString(16); h.push(g.length == 1 ? "0" + g : g), (m === 3 || m === 5 || m === 7 || m === 9) && h.push("-"); } const d = o - 16, f = new Uint8Array(d); for (let m = 0; m < d; m++) - f[m] = r[c++]; + f[m] = i[c++]; n.push({ payloadType: a, pts: t, @@ -22590,44 +22590,44 @@ function Kh(i, e, t, n) { } } } -function Ov(i) { - const e = i.byteLength, t = []; +function Ov(r) { + const e = r.byteLength, t = []; let n = 1; for (; n < e - 2; ) - i[n] === 0 && i[n + 1] === 0 && i[n + 2] === 3 ? (t.push(n + 2), n += 2) : n++; + r[n] === 0 && r[n + 1] === 0 && r[n + 2] === 3 ? (t.push(n + 2), n += 2) : n++; if (t.length === 0) - return i; - const r = e - t.length, s = new Uint8Array(r); + return r; + const i = e - t.length, s = new Uint8Array(i); let a = 0; - for (n = 0; n < r; a++, n++) - a === t[0] && (a++, t.shift()), s[n] = i[a]; + for (n = 0; n < i; a++, n++) + a === t[0] && (a++, t.shift()), s[n] = r[a]; return s; } -function jS(i) { - const e = i[0]; - let t = "", n = "", r = 0, s = 0, a = 0, o = 0, l = 0, u = 0; +function jS(r) { + const e = r[0]; + let t = "", n = "", i = 0, s = 0, a = 0, o = 0, l = 0, u = 0; if (e === 0) { - for (; Mt(i.subarray(u, u + 1)) !== "\0"; ) - t += Mt(i.subarray(u, u + 1)), u += 1; - for (t += Mt(i.subarray(u, u + 1)), u += 1; Mt(i.subarray(u, u + 1)) !== "\0"; ) - n += Mt(i.subarray(u, u + 1)), u += 1; - n += Mt(i.subarray(u, u + 1)), u += 1, r = we(i, 12), s = we(i, 16), o = we(i, 20), l = we(i, 24), u = 28; + for (; Mt(r.subarray(u, u + 1)) !== "\0"; ) + t += Mt(r.subarray(u, u + 1)), u += 1; + for (t += Mt(r.subarray(u, u + 1)), u += 1; Mt(r.subarray(u, u + 1)) !== "\0"; ) + n += Mt(r.subarray(u, u + 1)), u += 1; + n += Mt(r.subarray(u, u + 1)), u += 1, i = we(r, 12), s = we(r, 16), o = we(r, 20), l = we(r, 24), u = 28; } else if (e === 1) { - u += 4, r = we(i, u), u += 4; - const h = we(i, u); + u += 4, i = we(r, u), u += 4; + const h = we(r, u); u += 4; - const d = we(i, u); - for (u += 4, a = 2 ** 32 * h + d, TS(a) || (a = Number.MAX_SAFE_INTEGER, We.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")), o = we(i, u), u += 4, l = we(i, u), u += 4; Mt(i.subarray(u, u + 1)) !== "\0"; ) - t += Mt(i.subarray(u, u + 1)), u += 1; - for (t += Mt(i.subarray(u, u + 1)), u += 1; Mt(i.subarray(u, u + 1)) !== "\0"; ) - n += Mt(i.subarray(u, u + 1)), u += 1; - n += Mt(i.subarray(u, u + 1)), u += 1; - } - const c = i.subarray(u, i.byteLength); + const d = we(r, u); + for (u += 4, a = 2 ** 32 * h + d, TS(a) || (a = Number.MAX_SAFE_INTEGER, We.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")), o = we(r, u), u += 4, l = we(r, u), u += 4; Mt(r.subarray(u, u + 1)) !== "\0"; ) + t += Mt(r.subarray(u, u + 1)), u += 1; + for (t += Mt(r.subarray(u, u + 1)), u += 1; Mt(r.subarray(u, u + 1)) !== "\0"; ) + n += Mt(r.subarray(u, u + 1)), u += 1; + n += Mt(r.subarray(u, u + 1)), u += 1; + } + const c = r.subarray(u, r.byteLength); return { schemeIdUri: t, value: n, - timeScale: r, + timeScale: i, presentationTime: a, presentationTimeDelta: s, eventDuration: o, @@ -22635,21 +22635,21 @@ function jS(i) { payload: c }; } -function WS(i, ...e) { +function WS(r, ...e) { const t = e.length; - let n = 8, r = t; - for (; r--; ) - n += e[r].byteLength; + let n = 8, i = t; + for (; i--; ) + n += e[i].byteLength; const s = new Uint8Array(n); - for (s[0] = n >> 24 & 255, s[1] = n >> 16 & 255, s[2] = n >> 8 & 255, s[3] = n & 255, s.set(i, 4), r = 0, n = 8; r < t; r++) - s.set(e[r], n), n += e[r].byteLength; + for (s[0] = n >> 24 & 255, s[1] = n >> 16 & 255, s[2] = n >> 8 & 255, s[3] = n & 255, s.set(r, 4), i = 0, n = 8; i < t; i++) + s.set(e[i], n), n += e[i].byteLength; return s; } -function YS(i, e, t) { - if (i.byteLength !== 16) +function YS(r, e, t) { + if (r.byteLength !== 16) throw new RangeError("Invalid system id"); - let n, r; - n = 0, r = new Uint8Array(); + let n, i; + n = 0, i = new Uint8Array(); let s; n > 0 ? (s = new Uint8Array(4), e.length > 0 && new DataView(s.buffer).setUint32(0, e.length, !1)) : s = new Uint8Array(); const a = new Uint8Array(4); @@ -22662,50 +22662,50 @@ function YS(i, e, t) { 0 // Flags ]), - i, + r, // 16 bytes s, - r, + i, a, t ); } -function XS(i) { +function XS(r) { const e = []; - if (i instanceof ArrayBuffer) { - const t = i.byteLength; + if (r instanceof ArrayBuffer) { + const t = r.byteLength; let n = 0; for (; n + 32 < t; ) { - const r = new DataView(i, n), s = QS(r); + const i = new DataView(r, n), s = QS(i); e.push(s), n += s.size; } } return e; } -function QS(i) { - const e = i.getUint32(0), t = i.byteOffset, n = i.byteLength; +function QS(r) { + const e = r.getUint32(0), t = r.byteOffset, n = r.byteLength; if (n < e) return { offset: t, size: n }; - if (i.getUint32(4) !== 1886614376) + if (r.getUint32(4) !== 1886614376) return { offset: t, size: e }; - const s = i.getUint32(8) >>> 24; + const s = r.getUint32(8) >>> 24; if (s !== 0 && s !== 1) return { offset: t, size: e }; - const a = i.buffer, o = Kt(new Uint8Array(a, t + 12, 16)); + const a = r.buffer, o = Kt(new Uint8Array(a, t + 12, 16)); let l = null, u = null, c = 0; if (s === 0) c = 28; else { - const d = i.getUint32(28); + const d = r.getUint32(28); if (!d || n < 32 + d * 16) return { offset: t, @@ -22721,7 +22721,7 @@ function QS(i) { offset: t, size: e }; - const h = i.getUint32(c); + const h = r.getUint32(c); return e - 32 < h ? { offset: t, size: e @@ -22813,39 +22813,39 @@ const Bv = () => /\(Windows.+Firefox\//i.test(navigator.userAgent), Qs = { wvtt: 1 } }; -function jh(i, e) { +function jh(r, e) { const t = Qs[e]; - return !!t && !!t[i.slice(0, 4)]; + return !!t && !!t[r.slice(0, 4)]; } -function qa(i, e, t = !0) { - return !i.split(",").some((n) => !Wh(n, e, t)); +function qa(r, e, t = !0) { + return !r.split(",").some((n) => !Wh(n, e, t)); } -function Wh(i, e, t = !0) { +function Wh(r, e, t = !0) { var n; - const r = kr(t); - return (n = r == null ? void 0 : r.isTypeSupported(Va(i, e))) != null ? n : !1; + const i = ki(t); + return (n = i == null ? void 0 : i.isTypeSupported(Va(r, e))) != null ? n : !1; } -function Va(i, e) { - return `${e}/mp4;codecs=${i}`; +function Va(r, e) { + return `${e}/mp4;codecs=${r}`; } -function Um(i) { - if (i) { - const e = i.substring(0, 4); +function Um(r) { + if (r) { + const e = r.substring(0, 4); return Qs.video[e]; } return 2; } -function Nl(i) { +function Nl(r) { const e = Bv(); - return i.split(",").reduce((t, n) => { + return r.split(",").reduce((t, n) => { const s = e && A0(n) ? 9 : Qs.video[n]; return s ? (s * 2 + t) / (t ? 3 : 2) : (Qs.audio[n] + t) / (t ? 2 : 1); }, 0); } const Ru = {}; -function ZS(i, e = !0) { - if (Ru[i]) - return Ru[i]; +function ZS(r, e = !0) { + if (Ru[r]) + return Ru[r]; const t = { // Idealy fLaC and Opus would be first (spec-compliant) but // some browsers will report that fLaC is supported then fail. @@ -22855,67 +22855,67 @@ function ZS(i, e = !0) { // Replace audio codec info if browser does not support mp4a.40.34, // and demuxer can fallback to 'audio/mpeg' or 'audio/mp4;codecs="mp3"' "mp4a.40.34": ["mp3"] - }[i]; - for (let r = 0; r < t.length; r++) { + }[r]; + for (let i = 0; i < t.length; i++) { var n; - if (Wh(t[r], "audio", e)) - return Ru[i] = t[r], t[r]; - if (t[r] === "mp3" && (n = kr(e)) != null && n.isTypeSupported("audio/mpeg")) + if (Wh(t[i], "audio", e)) + return Ru[r] = t[i], t[i]; + if (t[i] === "mp3" && (n = ki(e)) != null && n.isTypeSupported("audio/mpeg")) return ""; } - return i; + return r; } const JS = /flac|opus|mp4a\.40\.34/i; -function $l(i, e = !0) { - return i.replace(JS, (t) => ZS(t.toLowerCase(), e)); +function $l(r, e = !0) { + return r.replace(JS, (t) => ZS(t.toLowerCase(), e)); } -function eT(i, e) { +function eT(r, e) { const t = []; - if (i) { - const n = i.split(","); - for (let r = 0; r < n.length; r++) - jh(n[r], "video") || t.push(n[r]); + if (r) { + const n = r.split(","); + for (let i = 0; i < n.length; i++) + jh(n[i], "video") || t.push(n[i]); } return e && t.push(e), t.join(","); } -function ol(i, e) { - if (i && (i.length > 4 || ["ac-3", "ec-3", "alac", "fLaC", "Opus"].indexOf(i) !== -1) && (Hm(i, "audio") || Hm(i, "video"))) - return i; +function ol(r, e) { + if (r && (r.length > 4 || ["ac-3", "ec-3", "alac", "fLaC", "Opus"].indexOf(r) !== -1) && (Hm(r, "audio") || Hm(r, "video"))) + return r; if (e) { const t = e.split(","); if (t.length > 1) { - if (i) { + if (r) { for (let n = t.length; n--; ) - if (t[n].substring(0, 4) === i.substring(0, 4)) + if (t[n].substring(0, 4) === r.substring(0, 4)) return t[n]; } return t[0]; } } - return e || i; + return e || r; } -function Hm(i, e) { - return jh(i, e) && Wh(i, e); +function Hm(r, e) { + return jh(r, e) && Wh(r, e); } -function tT(i) { - const e = i.split(","); +function tT(r) { + const e = r.split(","); for (let t = 0; t < e.length; t++) { const n = e[t].split("."); n.length > 2 && n[0] === "avc1" && (e[t] = `avc1.${parseInt(n[1]).toString(16)}${("000" + parseInt(n[2]).toString(16)).slice(-4)}`); } return e.join(","); } -function nT(i) { - if (i.startsWith("av01.")) { - const e = i.split("."), t = ["0", "111", "01", "01", "01", "0"]; +function nT(r) { + if (r.startsWith("av01.")) { + const e = r.split("."), t = ["0", "111", "01", "01", "01", "0"]; for (let n = e.length; n > 4 && n < 10; n++) e[n] = t[n - 4]; return e.join("."); } - return i; + return r; } -function Gm(i) { - const e = kr(i) || { +function Gm(r) { + const e = ki(r) || { isTypeSupported: () => !1 }; return { @@ -22924,15 +22924,15 @@ function Gm(i) { ac3: e.isTypeSupported('audio/mp4; codecs="ac-3"') }; } -function Mc(i) { - return i.replace(/^.+codecs=["']?([^"']+).*$/, "$1"); +function Mc(r) { + return r.replace(/^.+codecs=["']?([^"']+).*$/, "$1"); } -const iT = { +const rT = { supported: !0, powerEfficient: !0, smooth: !0 // keySystemAccess: null, -}, rT = { +}, iT = { supported: !1, smooth: !1, powerEfficient: !1 @@ -22940,18 +22940,18 @@ const iT = { }, Nv = { supported: !0, configurations: [], - decodingInfoResults: [iT] + decodingInfoResults: [rT] }; -function $v(i, e) { +function $v(r, e) { return { supported: !1, configurations: e, - decodingInfoResults: [rT], - error: i + decodingInfoResults: [iT], + error: r }; } -function sT(i, e, t, n, r, s) { - const a = i.videoCodec, o = i.audioCodec ? i.audioGroups : null, l = s == null ? void 0 : s.audioCodec, u = s == null ? void 0 : s.channels, c = u ? parseInt(u) : l ? 1 / 0 : 2; +function sT(r, e, t, n, i, s) { + const a = r.videoCodec, o = r.audioCodec ? r.audioGroups : null, l = s == null ? void 0 : s.audioCodec, u = s == null ? void 0 : s.channels, c = u ? parseInt(u) : l ? 1 / 0 : 2; let h = null; if (o != null && o.length) try { @@ -22972,13 +22972,13 @@ function sT(i, e, t, n, r, s) { return !0; } return a !== void 0 && // Force media capabilities check for HEVC to avoid failure on Windows - (a.split(",").some((d) => A0(d)) || i.width > 1920 && i.height > 1088 || i.height > 1920 && i.width > 1088 || i.frameRate > Math.max(n, 30) || i.videoRange !== "SDR" && i.videoRange !== t || i.bitrate > Math.max(r, 8e6)) || !!h && oe(c) && Object.keys(h).some((d) => parseInt(d) > c); + (a.split(",").some((d) => A0(d)) || r.width > 1920 && r.height > 1088 || r.height > 1920 && r.width > 1088 || r.frameRate > Math.max(n, 30) || r.videoRange !== "SDR" && r.videoRange !== t || r.bitrate > Math.max(i, 8e6)) || !!h && oe(c) && Object.keys(h).some((d) => parseInt(d) > c); } -function Uv(i, e, t, n = {}) { - const r = i.videoCodec; - if (!r && !i.audioCodec || !t) +function Uv(r, e, t, n = {}) { + const i = r.videoCodec; + if (!i && !r.audioCodec || !t) return Promise.resolve(Nv); - const s = [], a = aT(i), o = a.length, l = oT(i, e, o > 0), u = l.length; + const s = [], a = aT(r), o = a.length, l = oT(r, e, o > 0), u = l.length; for (let c = o || 1 * u || 1; c--; ) { const h = { type: "media-source" @@ -22990,9 +22990,9 @@ function Uv(i, e, t, n = {}) { } s.push(h); } - if (r) { + if (i) { const c = navigator.userAgent; - if (r.split(",").some((h) => A0(h)) && Bv()) + if (i.split(",").some((h) => A0(h)) && Bv()) return Promise.resolve($v(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${c})`), s)); } return Promise.all(s.map((c) => { @@ -23009,13 +23009,13 @@ function Uv(i, e, t, n = {}) { error: c })); } -function aT(i) { +function aT(r) { var e; - const t = (e = i.videoCodec) == null ? void 0 : e.split(","), n = Hv(i), r = i.width || 640, s = i.height || 480, a = i.frameRate || 30, o = i.videoRange.toLowerCase(); + const t = (e = r.videoCodec) == null ? void 0 : e.split(","), n = Hv(r), i = r.width || 640, s = r.height || 480, a = r.frameRate || 30, o = r.videoRange.toLowerCase(); return t ? t.map((l) => { const u = { contentType: Va(nT(l), "video"), - width: r, + width: i, height: s, bitrate: n, framerate: a @@ -23023,16 +23023,16 @@ function aT(i) { return o !== "sdr" && (u.transferFunction = o), u; }) : []; } -function oT(i, e, t) { +function oT(r, e, t) { var n; - const r = (n = i.audioCodec) == null ? void 0 : n.split(","), s = Hv(i); - return r && i.audioGroups ? i.audioGroups.reduce((a, o) => { + const i = (n = r.audioCodec) == null ? void 0 : n.split(","), s = Hv(r); + return i && r.audioGroups ? r.audioGroups.reduce((a, o) => { var l; const u = o ? (l = e.groups[o]) == null ? void 0 : l.tracks : null; return u ? u.reduce((c, h) => { if (h.groupId === o) { const d = parseFloat(h.channels || ""); - r.forEach((f) => { + i.forEach((f) => { const m = { contentType: Va(f, "audio"), bitrate: t ? lT(f, s) : s @@ -23044,51 +23044,51 @@ function oT(i, e, t) { }, a) : a; }, []) : []; } -function lT(i, e) { +function lT(r, e) { if (e <= 1) return 1; let t = 128e3; - return i === "ec-3" ? t = 768e3 : i === "ac-3" && (t = 64e4), Math.min(e / 2, t); + return r === "ec-3" ? t = 768e3 : r === "ac-3" && (t = 64e4), Math.min(e / 2, t); } -function Hv(i) { - return Math.ceil(Math.max(i.bitrate * 0.9, i.averageBitrate) / 1e3) * 1e3 || 1; +function Hv(r) { + return Math.ceil(Math.max(r.bitrate * 0.9, r.averageBitrate) / 1e3) * 1e3 || 1; } -function uT(i) { +function uT(r) { let e = ""; const { audio: t, video: n - } = i; + } = r; if (n) { - const r = Mc(n.contentType); - e += `${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction || "sd"}_${Math.ceil(n.bitrate / 1e5)}`; + const i = Mc(n.contentType); + e += `${i}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction || "sd"}_${Math.ceil(n.bitrate / 1e5)}`; } if (t) { - const r = Mc(t.contentType); - e += `${n ? "_" : ""}${r}_c${t.channels}`; + const i = Mc(t.contentType); + e += `${n ? "_" : ""}${i}_c${t.channels}`; } return e; } const Oc = ["NONE", "TYPE-0", "TYPE-1", null]; -function cT(i) { - return Oc.indexOf(i) > -1; +function cT(r) { + return Oc.indexOf(r) > -1; } const Ul = ["SDR", "PQ", "HLG"]; -function hT(i) { - return !!i && Ul.indexOf(i) > -1; +function hT(r) { + return !!r && Ul.indexOf(r) > -1; } var ll = { No: "", Yes: "YES", v2: "v2" }; -function zm(i) { +function zm(r) { const { canSkipUntil: e, canSkipDateRanges: t, age: n - } = i, r = n < e / 2; - return e && r ? t ? ll.v2 : ll.Yes : ll.No; + } = r, i = n < e / 2; + return e && i ? t ? ll.v2 : ll.Yes : ll.No; } class qm { constructor(e, t, n) { @@ -23179,49 +23179,49 @@ class Ka { addFallback() { } } -function Vm(i, e) { - return !e || !i ? !1 : i.indexOf(e) !== -1; +function Vm(r, e) { + return !e || !r ? !1 : r.indexOf(e) !== -1; } function dT() { if (typeof matchMedia == "function") { - const i = matchMedia("(dynamic-range: high)"), e = matchMedia("bad query"); - if (i.media !== e.media) - return i.matches === !0; + const r = matchMedia("(dynamic-range: high)"), e = matchMedia("bad query"); + if (r.media !== e.media) + return r.matches === !0; } return !1; } -function fT(i, e) { +function fT(r, e) { let t = !1, n = []; - if (i && (t = i !== "SDR", n = [i]), e) { + if (r && (t = r !== "SDR", n = [r]), e) { n = e.allowedVideoRanges || Ul.slice(0); - const r = n.join("") !== "SDR" && !e.videoCodec; - t = e.preferHDR !== void 0 ? e.preferHDR : r && dT(), t || (n = ["SDR"]); + const i = n.join("") !== "SDR" && !e.videoCodec; + t = e.preferHDR !== void 0 ? e.preferHDR : i && dT(), t || (n = ["SDR"]); } return { preferHDR: t, allowedVideoRanges: n }; } -const mT = (i) => { +const mT = (r) => { const e = /* @__PURE__ */ new WeakSet(); return (t, n) => { - if (i && (n = i(t, n)), typeof n == "object" && n !== null) { + if (r && (n = r(t, n)), typeof n == "object" && n !== null) { if (e.has(n)) return; e.add(n); } return n; }; -}, et = (i, e) => JSON.stringify(i, mT(e)); -function gT(i, e, t, n, r) { - const s = Object.keys(i), a = n == null ? void 0 : n.channels, o = n == null ? void 0 : n.audioCodec, l = r == null ? void 0 : r.videoCodec, u = a && parseInt(a) === 2; +}, et = (r, e) => JSON.stringify(r, mT(e)); +function gT(r, e, t, n, i) { + const s = Object.keys(r), a = n == null ? void 0 : n.channels, o = n == null ? void 0 : n.audioCodec, l = i == null ? void 0 : i.videoCodec, u = a && parseInt(a) === 2; let c = !1, h = !1, d = 1 / 0, f = 1 / 0, m = 1 / 0, g = 1 / 0, p = 0, b = []; const { preferHDR: y, allowedVideoRanges: v - } = fT(e, r); + } = fT(e, i); for (let L = s.length; L--; ) { - const I = i[s[L]]; + const I = r[s[L]]; c || (c = I.channels[2] > 0), d = Math.min(d, I.minHeight), f = Math.min(f, I.minFramerate), m = Math.min(m, I.minBitrate), v.filter((M) => I.videoRanges[M] > 0).length > 0 && (h = !0); } d = oe(d) ? d : 0, f = oe(f) ? f : 0; @@ -23230,33 +23230,33 @@ function gT(i, e, t, n, r) { const w = s.length > 1; return { codecSet: s.reduce((L, I) => { - const R = i[I]; + const R = r[I]; if (I === L) return L; if (b = h ? v.filter((M) => R.videoRanges[M] > 0) : [], w) { if (R.minBitrate > t) - return Ti(I, `min bitrate of ${R.minBitrate} > current estimate of ${t}`), L; + return Tr(I, `min bitrate of ${R.minBitrate} > current estimate of ${t}`), L; if (!R.hasDefaultAudio) - return Ti(I, "no renditions with default or auto-select sound found"), L; + return Tr(I, "no renditions with default or auto-select sound found"), L; if (o && I.indexOf(o.substring(0, 4)) % 5 !== 0) - return Ti(I, `audio codec preference "${o}" not found`), L; + return Tr(I, `audio codec preference "${o}" not found`), L; if (a && !u) { if (!R.channels[a]) - return Ti(I, `no renditions with ${a} channel sound found (channels options: ${Object.keys(R.channels)})`), L; + return Tr(I, `no renditions with ${a} channel sound found (channels options: ${Object.keys(R.channels)})`), L; } else if ((!o || u) && c && R.channels[2] === 0) - return Ti(I, "no renditions with stereo sound found"), L; + return Tr(I, "no renditions with stereo sound found"), L; if (R.minHeight > T) - return Ti(I, `min resolution of ${R.minHeight} > maximum of ${T}`), L; + return Tr(I, `min resolution of ${R.minHeight} > maximum of ${T}`), L; if (R.minFramerate > A) - return Ti(I, `min framerate of ${R.minFramerate} > maximum of ${A}`), L; + return Tr(I, `min framerate of ${R.minFramerate} > maximum of ${A}`), L; if (!b.some((M) => R.videoRanges[M] > 0)) - return Ti(I, `no variants with VIDEO-RANGE of ${et(b)} found`), L; + return Tr(I, `no variants with VIDEO-RANGE of ${et(b)} found`), L; if (l && I.indexOf(l.substring(0, 4)) % 5 !== 0) - return Ti(I, `video codec preference "${l}" not found`), L; + return Tr(I, `video codec preference "${l}" not found`), L; if (R.maxScore < p) - return Ti(I, `max score of ${R.maxScore} < selected max of ${p}`), L; + return Tr(I, `max score of ${R.maxScore} < selected max of ${p}`), L; } - return L && (Nl(I) >= Nl(L) || R.fragmentError > i[L].fragmentError) ? L : (g = R.minIndex, p = R.maxScore, I); + return L && (Nl(I) >= Nl(L) || R.fragmentError > r[L].fragmentError) ? L : (g = R.minIndex, p = R.maxScore, I); }, void 0), videoRanges: b, preferHDR: y, @@ -23265,11 +23265,11 @@ function gT(i, e, t, n, r) { minIndex: g }; } -function Ti(i, e) { - We.log(`[abr] start candidates with "${i}" ignored because ${e}`); +function Tr(r, e) { + We.log(`[abr] start candidates with "${r}" ignored because ${e}`); } -function Gv(i) { - return i.reduce((e, t) => { +function Gv(r) { + return r.reduce((e, t) => { let n = e.groups[t.groupId]; n || (n = e.groups[t.groupId] = { tracks: [], @@ -23279,21 +23279,21 @@ function Gv(i) { hasDefault: !1, hasAutoSelect: !1 }), n.tracks.push(t); - const r = t.channels || "2"; - return n.channels[r] = (n.channels[r] || 0) + 1, n.hasDefault = n.hasDefault || t.default, n.hasAutoSelect = n.hasAutoSelect || t.autoselect, n.hasDefault && (e.hasDefaultAudio = !0), n.hasAutoSelect && (e.hasAutoSelectAudio = !0), e; + const i = t.channels || "2"; + return n.channels[i] = (n.channels[i] || 0) + 1, n.hasDefault = n.hasDefault || t.default, n.hasAutoSelect = n.hasAutoSelect || t.autoselect, n.hasDefault && (e.hasDefaultAudio = !0), n.hasAutoSelect && (e.hasAutoSelectAudio = !0), e; }, { hasDefaultAudio: !1, hasAutoSelectAudio: !1, groups: {} }); } -function pT(i, e, t, n) { - return i.slice(t, n + 1).reduce((r, s, a) => { +function pT(r, e, t, n) { + return r.slice(t, n + 1).reduce((i, s, a) => { if (!s.codecSet) - return r; + return i; const o = s.audioGroups; - let l = r[s.codecSet]; - l || (r[s.codecSet] = l = { + let l = i[s.codecSet]; + l || (i[s.codecSet] = l = { minBitrate: 1 / 0, minHeight: 1 / 0, minFramerate: 1 / 0, @@ -23316,65 +23316,65 @@ function pT(i, e, t, n) { h && (l.hasDefaultAudio = l.hasDefaultAudio || e.hasDefaultAudio ? h.hasDefault : h.hasAutoSelect || !e.hasDefaultAudio && !e.hasAutoSelectAudio, Object.keys(h.channels).forEach((d) => { l.channels[d] = (l.channels[d] || 0) + h.channels[d]; })); - }), r; + }), i; }, {}); } -function Km(i) { - if (!i) - return i; +function Km(r) { + if (!r) + return r; const { lang: e, assocLang: t, characteristics: n, - channels: r, + channels: i, audioCodec: s - } = i; + } = r; return { lang: e, assocLang: t, characteristics: n, - channels: r, + channels: i, audioCodec: s }; } -function Fi(i, e, t) { - if ("attrs" in i) { - const n = e.indexOf(i); +function Fr(r, e, t) { + if ("attrs" in r) { + const n = e.indexOf(r); if (n !== -1) return n; } for (let n = 0; n < e.length; n++) { - const r = e[n]; - if (Jr(i, r, t)) + const i = e[n]; + if (Ji(r, i, t)) return n; } return -1; } -function Jr(i, e, t) { +function Ji(r, e, t) { const { groupId: n, - name: r, + name: i, lang: s, assocLang: a, default: o - } = i, l = i.forced; - return (n === void 0 || e.groupId === n) && (r === void 0 || e.name === r) && (s === void 0 || _T(s, e.lang)) && (s === void 0 || e.assocLang === a) && (o === void 0 || e.default === o) && (l === void 0 || e.forced === l) && (!("characteristics" in i) || vT(i.characteristics || "", e.characteristics)) && (t === void 0 || t(i, e)); + } = r, l = r.forced; + return (n === void 0 || e.groupId === n) && (i === void 0 || e.name === i) && (s === void 0 || _T(s, e.lang)) && (s === void 0 || e.assocLang === a) && (o === void 0 || e.default === o) && (l === void 0 || e.forced === l) && (!("characteristics" in r) || vT(r.characteristics || "", e.characteristics)) && (t === void 0 || t(r, e)); } -function _T(i, e = "--") { - return i.length === e.length ? i === e : i.startsWith(e) || e.startsWith(i); +function _T(r, e = "--") { + return r.length === e.length ? r === e : r.startsWith(e) || e.startsWith(r); } -function vT(i, e = "") { - const t = i.split(","), n = e.split(","); - return t.length === n.length && !t.some((r) => n.indexOf(r) === -1); +function vT(r, e = "") { + const t = r.split(","), n = e.split(","); + return t.length === n.length && !t.some((i) => n.indexOf(i) === -1); } -function zr(i, e) { +function zi(r, e) { const { audioCodec: t, channels: n - } = i; + } = r; return (t === void 0 || (e.audioCodec || "").substring(0, 4) === t.substring(0, 4)) && (n === void 0 || n === (e.channels || "2")); } -function yT(i, e, t, n, r) { +function yT(r, e, t, n, i) { const s = e[n], o = e.reduce((d, f, m) => { const g = f.uri; return (d[g] || (d[g] = [])).push(m), d; @@ -23384,41 +23384,41 @@ function yT(i, e, t, n, r) { if (d.videoRange !== l || d.frameRate !== u || d.codecSet.substring(0, 4) !== c) return !1; const f = d.audioGroups, m = t.filter((g) => !f || f.indexOf(g.groupId) !== -1); - return Fi(i, m, r) > -1; + return Fr(r, m, i) > -1; }); return h > -1 ? h : jm(e, n, (d) => { const f = d.audioGroups, m = t.filter((g) => !f || f.indexOf(g.groupId) !== -1); - return Fi(i, m, r) > -1; + return Fr(r, m, i) > -1; }); } -function jm(i, e, t) { +function jm(r, e, t) { for (let n = e; n > -1; n--) - if (t(i[n])) + if (t(r[n])) return n; - for (let n = e + 1; n < i.length; n++) - if (t(i[n])) + for (let n = e + 1; n < r.length; n++) + if (t(r[n])) return n; return -1; } -function Hl(i, e) { +function Hl(r, e) { var t; - return !!i && i !== ((t = e.loadLevelObj) == null ? void 0 : t.uri); + return !!r && r !== ((t = e.loadLevelObj) == null ? void 0 : t.uri); } -class bT extends ni { +class bT extends nr { constructor(e) { super("abr", e.logger), this.hls = void 0, this.lastLevelLoadSec = 0, this.lastLoadedFragLevel = -1, this.firstSelection = -1, this._nextAutoLevel = -1, this.nextAutoLevelKey = "", this.audioTracksByGroup = null, this.codecTiers = null, this.timer = -1, this.fragCurrent = null, this.partCurrent = null, this.bitrateTestDelay = 0, this.rebufferNotice = -1, this.supportedCache = {}, this.bwEstimator = void 0, this._abandonRulesCheck = (t) => { var n; const { - fragCurrent: r, + fragCurrent: i, partCurrent: s, hls: a } = this, { autoLevelEnabled: o, media: l } = a; - if (!r || !l) + if (!i || !l) return; - const u = performance.now(), c = s ? s.stats : r.stats, h = s ? s.duration : r.duration, d = u - c.loading.start, f = a.minAutoLevel, m = r.level, g = this._nextAutoLevel; + const u = performance.now(), c = s ? s.stats : i.stats, h = s ? s.duration : i.duration, d = u - c.loading.start, f = a.minAutoLevel, m = i.level, g = this._nextAutoLevel; if (c.aborted || c.loaded && c.loaded === c.total || m <= f) { this.clearTimer(), this._nextAutoLevel = -1; return; @@ -23434,7 +23434,7 @@ class bT extends ni { const v = this.bwEstimator.getEstimateTTFB(), T = Math.abs(l.playbackRate); if (d <= Math.max(v, 1e3 * (h / (T * 2)))) return; - const A = y ? y.len / T : 0, w = c.loading.first ? c.loading.first - c.loading.start : -1, D = c.loaded && w > -1, L = this.getBwEstimate(), I = a.levels, R = I[m], M = Math.max(c.loaded, Math.round(h * (r.bitrate || R.averageBitrate) / 8)); + const A = y ? y.len / T : 0, w = c.loading.first ? c.loading.first - c.loading.start : -1, D = c.loaded && w > -1, L = this.getBwEstimate(), I = a.levels, R = I[m], M = Math.max(c.loaded, Math.round(h * (i.bitrate || R.averageBitrate) / 8)); let P = D ? d - w : d; P < 1 && D && (P = Math.min(d, c.loaded * 8 / L)); const V = D ? c.loaded * 1e3 / P : 0, U = v / 1e3, J = V ? (M - c.loaded) / V : M * 8 / L + U; @@ -23453,8 +23453,8 @@ class bT extends ni { const B = I[ne].maxBitrate; this.getBwEstimate() * $ > B && this.resetEstimator(B); const q = this.findBestLevel(B, f, ne, 0, A, 1, 1); - q > -1 && (ne = q), this.warn(`Fragment ${r.sn}${s ? " part " + s.index : ""} of level ${m} is loading too slowly; - Fragment duration: ${r.duration.toFixed(3)} + q > -1 && (ne = q), this.warn(`Fragment ${i.sn}${s ? " part " + s.index : ""} of level ${m} is loading too slowly; + Fragment duration: ${i.duration.toFixed(3)} Time to underbuffer: ${A.toFixed(3)} s Estimated load time for current fragment: ${J.toFixed(3)} s Estimated load time for down switch fragment: ${Z.toFixed(3)} s @@ -23463,18 +23463,18 @@ class bT extends ni { New BW estimate: ${this.getBwEstimate() | 0} bps Switching to level ${ne} @ ${B | 0} bps`), a.nextLoadLevel = a.nextAutoLevel = ne, this.clearTimer(); const se = () => { - if (this.clearTimer(), this.fragCurrent === r && this.hls.loadLevel === ne && ne > 0) { + if (this.clearTimer(), this.fragCurrent === i && this.hls.loadLevel === ne && ne > 0) { const he = this.getStarvationDelay(); if (this.warn(`Aborting inflight request ${ne > 0 ? "and switching down" : ""} - Fragment duration: ${r.duration.toFixed(3)} s - Time to underbuffer: ${he.toFixed(3)} s`), r.abortRequests(), this.fragCurrent = this.partCurrent = null, ne > f) { + Fragment duration: ${i.duration.toFixed(3)} s + Time to underbuffer: ${he.toFixed(3)} s`), i.abortRequests(), this.fragCurrent = this.partCurrent = null, ne > f) { let K = this.findBestLevel(this.hls.levels[f].bitrate, f, ne, 0, he, 1, 1); K === -1 && (K = f), this.hls.nextLoadLevel = this.hls.nextAutoLevel = K, this.resetEstimator(this.hls.levels[K].bitrate); } } }; p || J > Z * 2 ? se() : this.timer = self.setInterval(se, Z * 1e3), a.trigger(S.FRAG_LOAD_EMERGENCY_ABORTED, { - frag: r, + frag: i, part: s, stats: c }); @@ -23515,8 +23515,8 @@ class bT extends ni { const n = t.frag; if (!this.ignoreFragment(n)) { if (!n.bitrateTest) { - var r; - this.fragCurrent = n, this.partCurrent = (r = t.part) != null ? r : null; + var i; + this.fragCurrent = n, this.partCurrent = (i = t.part) != null ? i : null; } this.clearTimer(), this.timer = self.setInterval(this._abandonRulesCheck, 100); } @@ -23533,10 +23533,10 @@ class bT extends ni { break; case G.FRAG_LOAD_TIMEOUT: { const n = t.frag, { - fragCurrent: r, + fragCurrent: i, partCurrent: s } = this; - if (n && r && n.sn === r.sn && n.level === r.level) { + if (n && i && n.sn === i.sn && n.level === i.level) { const a = performance.now(), o = s ? s.stats : n.stats, l = a - o.loading.start, u = o.loading.first ? o.loading.first - o.loading.start : -1; if (o.loaded && u > -1) { const h = this.bwEstimator.getEstimateTTFB(); @@ -23548,24 +23548,24 @@ class bT extends ni { } } } - getTimeToLoadFrag(e, t, n, r) { - const s = e + n / t, a = r ? e + this.lastLevelLoadSec : 0; + getTimeToLoadFrag(e, t, n, i) { + const s = e + n / t, a = i ? e + this.lastLevelLoadSec : 0; return s + a; } onLevelLoaded(e, t) { const n = this.hls.config, { - loading: r - } = t.stats, s = r.end - r.first; + loading: i + } = t.stats, s = i.end - i.first; oe(s) && (this.lastLevelLoadSec = s / 1e3), t.details.live ? this.bwEstimator.update(n.abrEwmaSlowLive, n.abrEwmaFastLive) : this.bwEstimator.update(n.abrEwmaSlowVoD, n.abrEwmaFastVoD), this.timer > -1 && this._abandonRulesCheck(t.levelInfo); } onFragLoaded(e, { frag: t, part: n }) { - const r = n ? n.stats : t.stats; - if (t.type === ce.MAIN && this.bwEstimator.sampleTTFB(r.loading.first - r.loading.start), !this.ignoreFragment(t)) { + const i = n ? n.stats : t.stats; + if (t.type === ce.MAIN && this.bwEstimator.sampleTTFB(i.loading.first - i.loading.start), !this.ignoreFragment(t)) { if (this.clearTimer(), t.level === this._nextAutoLevel && (this._nextAutoLevel = -1), this.firstSelection = -1, this.hls.config.abrMaxWithRealBitrate) { - const s = n ? n.duration : t.duration, a = this.hls.levels[t.level], o = (a.loaded ? a.loaded.bytes : 0) + r.loaded, l = (a.loaded ? a.loaded.duration : 0) + s; + const s = n ? n.duration : t.duration, a = this.hls.levels[t.level], o = (a.loaded ? a.loaded.bytes : 0) + i.loaded, l = (a.loaded ? a.loaded.duration : 0) + s; a.loaded = { bytes: o, duration: l @@ -23573,7 +23573,7 @@ class bT extends ni { } if (t.bitrateTest) { const s = { - stats: r, + stats: i, frag: t, part: n, id: t.type @@ -23586,8 +23586,8 @@ class bT extends ni { onFragBuffered(e, t) { const { frag: n, - part: r - } = t, s = r != null && r.stats.loaded ? r.stats : n.stats; + part: i + } = t, s = i != null && i.stats.loaded ? i.stats : n.stats; if (s.aborted || this.ignoreFragment(n)) return; const a = s.parsing.end - s.loading.start - Math.min(s.loading.first - s.loading.start, this.bwEstimator.getEstimateTTFB()); @@ -23603,7 +23603,7 @@ class bT extends ni { const { maxAutoLevel: e, minAutoLevel: t - } = this.hls, n = this.getBwEstimate(), r = this.hls.config.maxStarvationDelay, s = this.findBestLevel(n, t, e, 0, r, 1, 1); + } = this.hls, n = this.getBwEstimate(), i = this.hls.config.maxStarvationDelay, s = this.findBestLevel(n, t, e, 0, i, 1, 1); if (s > -1) return s; const a = this.hls.firstLevel, o = Math.min(Math.max(a, t), e); @@ -23614,10 +23614,10 @@ class bT extends ni { } // return next auto level get nextAutoLevel() { - const e = this.forcedAutoLevel, n = this.bwEstimator.canEstimate(), r = this.lastLoadedFragLevel > -1; - if (e !== -1 && (!n || !r || this.nextAutoLevelKey === this.getAutoLevelKey())) + const e = this.forcedAutoLevel, n = this.bwEstimator.canEstimate(), i = this.lastLoadedFragLevel > -1; + if (e !== -1 && (!n || !i || this.nextAutoLevelKey === this.getAutoLevelKey())) return e; - const s = n && r ? this.getNextABRAutoLevel() : this.firstAutoLevel; + const s = n && i ? this.getNextABRAutoLevel() : this.firstAutoLevel; if (e !== -1) { const a = this.hls.levels; if (a.length > Math.max(e, s) && a[e].loadError <= a[s].loadError) @@ -23637,13 +23637,13 @@ class bT extends ni { if (n.levels.length <= 1) return n.loadLevel; const { - maxAutoLevel: r, + maxAutoLevel: i, config: s, minAutoLevel: a } = n, o = t ? t.duration : e ? e.duration : 0, l = this.getBwEstimate(), u = this.getStarvationDelay(); let c = s.abrBandWidthFactor, h = s.abrBandWidthUpFactor; if (u) { - const p = this.findBestLevel(l, a, r, u, 0, c, h); + const p = this.findBestLevel(l, a, i, u, 0, c, h); if (p >= 0) return this.rebufferNotice = -1, p; } @@ -23652,7 +23652,7 @@ class bT extends ni { const p = this.bitrateTestDelay; p && (d = (o ? Math.min(o, s.maxLoadingDelay) : s.maxLoadingDelay) - p, this.info(`bitrate test took ${Math.round(1e3 * p)}ms, set first fragment max fetchDuration to ${Math.round(1e3 * d)} ms`), c = h = 1); } - const f = this.findBestLevel(l, a, r, u, d, c, h); + const f = this.findBestLevel(l, a, i, u, d, c, h); if (this.rebufferNotice !== f && (this.rebufferNotice = f, this.info(`${u ? "rebuffering expected" : "buffer is empty"}, optimal quality level ${f}`)), f > -1) return f; const m = n.levels[a], g = n.loadLevelObj; @@ -23662,15 +23662,15 @@ class bT extends ni { const e = this.hls, t = e.media; if (!t) return 1 / 0; - const n = t && t.playbackRate !== 0 ? Math.abs(t.playbackRate) : 1, r = e.mainForwardBufferInfo; - return (r ? r.len : 0) / n; + const n = t && t.playbackRate !== 0 ? Math.abs(t.playbackRate) : 1, i = e.mainForwardBufferInfo; + return (i ? i.len : 0) / n; } getBwEstimate() { return this.bwEstimator.canEstimate() ? this.bwEstimator.getEstimate() : this.hls.config.abrEwmaDefaultEstimate; } - findBestLevel(e, t, n, r, s, a, o) { + findBestLevel(e, t, n, i, s, a, o) { var l; - const u = r + s, c = this.lastLoadedFragLevel, h = c === -1 ? this.hls.firstLevel : c, { + const u = i + s, c = this.lastLoadedFragLevel, h = c === -1 ? this.hls.firstLevel : c, { fragCurrent: d, partCurrent: f } = this, { @@ -23727,7 +23727,7 @@ class bT extends ni { const Z = X.details, ne = (f ? Z == null ? void 0 : Z.partTarget : Z == null ? void 0 : Z.averagetargetduration) || P; let B; $ ? B = o * e : B = a * e; - const q = P && r >= P * 2 && s === 0 ? X.averageBitrate : X.maxBitrate, se = this.getTimeToLoadFrag(V, B, q * ne, Z === void 0); + const q = P && i >= P * 2 && s === 0 ? X.averageBitrate : X.maxBitrate, se = this.getTimeToLoadFrag(V, B, q * ne, Z === void 0); if ( // if adjusted bw is greater than level bitrate AND B >= q && // no level change, or new level has no error history @@ -23770,80 +23770,80 @@ const zv = { * * @returns the object if found, otherwise returns null */ - search: function(i, e) { - let t = 0, n = i.length - 1, r = null, s = null; + search: function(r, e) { + let t = 0, n = r.length - 1, i = null, s = null; for (; t <= n; ) { - r = (t + n) / 2 | 0, s = i[r]; + i = (t + n) / 2 | 0, s = r[i]; const a = e(s); if (a > 0) - t = r + 1; + t = i + 1; else if (a < 0) - n = r - 1; + n = i - 1; else return s; } return null; } }; -function ET(i, e, t) { - if (e === null || !Array.isArray(i) || !i.length || !oe(e)) +function ET(r, e, t) { + if (e === null || !Array.isArray(r) || !r.length || !oe(e)) return null; - const n = i[0].programDateTime; + const n = r[0].programDateTime; if (e < (n || 0)) return null; - const r = i[i.length - 1].endProgramDateTime; - if (e >= (r || 0)) + const i = r[r.length - 1].endProgramDateTime; + if (e >= (i || 0)) return null; - for (let s = 0; s < i.length; ++s) { - const a = i[s]; + for (let s = 0; s < r.length; ++s) { + const a = r[s]; if (TT(e, t, a)) return a; } return null; } -function os(i, e, t = 0, n = 0, r = 5e-3) { +function os(r, e, t = 0, n = 0, i = 5e-3) { let s = null; - if (i) { - s = e[1 + i.sn - e[0].sn] || null; - const o = i.endDTS - t; - o > 0 && o < 15e-7 && (t += 15e-7), s && i.level !== s.level && s.end <= i.end && (s = e[2 + i.sn - e[0].sn] || null); + if (r) { + s = e[1 + r.sn - e[0].sn] || null; + const o = r.endDTS - t; + o > 0 && o < 15e-7 && (t += 15e-7), s && r.level !== s.level && s.end <= r.end && (s = e[2 + r.sn - e[0].sn] || null); } else t === 0 && e[0].start === 0 && (s = e[0]); - if (s && ((!i || i.level === s.level) && Wm(t, n, s) === 0 || ST(s, i, Math.min(r, n)))) + if (s && ((!r || r.level === s.level) && Wm(t, n, s) === 0 || ST(s, r, Math.min(i, n)))) return s; const a = zv.search(e, Wm.bind(null, t, n)); - return a && (a !== i || !s) ? a : s; + return a && (a !== r || !s) ? a : s; } -function ST(i, e, t) { - if (e && e.start === 0 && e.level < i.level && (e.endPTS || 0) > 0) { - const n = e.tagList.reduce((r, s) => (s[0] === "INF" && (r += parseFloat(s[1])), r), t); - return i.start <= n; +function ST(r, e, t) { + if (e && e.start === 0 && e.level < r.level && (e.endPTS || 0) > 0) { + const n = e.tagList.reduce((i, s) => (s[0] === "INF" && (i += parseFloat(s[1])), i), t); + return r.start <= n; } return !1; } -function Wm(i = 0, e = 0, t) { - if (t.start <= i && t.start + t.duration > i) +function Wm(r = 0, e = 0, t) { + if (t.start <= r && t.start + t.duration > r) return 0; const n = Math.min(e, t.duration + (t.deltaPTS ? t.deltaPTS : 0)); - return t.start + t.duration - n <= i ? 1 : t.start - n > i && t.start ? -1 : 0; + return t.start + t.duration - n <= r ? 1 : t.start - n > r && t.start ? -1 : 0; } -function TT(i, e, t) { +function TT(r, e, t) { const n = Math.min(e, t.duration + (t.deltaPTS ? t.deltaPTS : 0)) * 1e3; - return (t.endProgramDateTime || 0) - n > i; + return (t.endProgramDateTime || 0) - n > r; } -function qv(i, e, t) { - if (i && i.startCC <= e && i.endCC >= e) { - let n = i.fragments; +function qv(r, e, t) { + if (r && r.startCC <= e && r.endCC >= e) { + let n = r.fragments; const { - fragmentHint: r - } = i; - r && (n = n.concat(r)); + fragmentHint: i + } = r; + i && (n = n.concat(i)); let s; return zv.search(n, (a) => a.cc < e ? 1 : a.cc > e ? -1 : (s = a, a.end <= t ? 1 : a.start > t ? -1 : 0)), s || null; } return null; } -function Gl(i) { - switch (i.details) { +function Gl(r) { + switch (r.details) { case G.FRAG_LOAD_TIMEOUT: case G.KEY_LOAD_TIMEOUT: case G.LEVEL_LOAD_TIMEOUT: @@ -23852,37 +23852,37 @@ function Gl(i) { } return !1; } -function Vv(i) { - return i.details.startsWith("key"); +function Vv(r) { + return r.details.startsWith("key"); } -function Kv(i) { - return Vv(i) && !!i.frag && !i.frag.decryptdata; +function Kv(r) { + return Vv(r) && !!r.frag && !r.frag.decryptdata; } -function Ym(i, e) { +function Ym(r, e) { const t = Gl(e); - return i.default[`${t ? "timeout" : "error"}Retry`]; + return r.default[`${t ? "timeout" : "error"}Retry`]; } -function Yh(i, e) { - const t = i.backoff === "linear" ? 1 : Math.pow(2, e); - return Math.min(t * i.retryDelayMs, i.maxRetryDelayMs); +function Yh(r, e) { + const t = r.backoff === "linear" ? 1 : Math.pow(2, e); + return Math.min(t * r.retryDelayMs, r.maxRetryDelayMs); } -function Xm(i) { - return je(je({}, i), { +function Xm(r) { + return je(je({}, r), { errorRetry: null, timeoutRetry: null }); } -function zl(i, e, t, n) { - if (!i) +function zl(r, e, t, n) { + if (!r) return !1; - const r = n == null ? void 0 : n.code, s = e < i.maxNumRetry && (AT(r) || !!t); - return i.shouldRetry ? i.shouldRetry(i, e, t, n, s) : s; + const i = n == null ? void 0 : n.code, s = e < r.maxNumRetry && (AT(i) || !!t); + return r.shouldRetry ? r.shouldRetry(r, e, t, n, s) : s; } -function AT(i) { - return Bc(i) || !!i && (i < 400 || i > 499); +function AT(r) { + return Bc(r) || !!r && (r < 400 || r > 499); } -function Bc(i) { - return i === 0 && navigator.onLine === !1; +function Bc(r) { + return r === 0 && navigator.onLine === !1; } var Vt = { DoNothing: 0, @@ -23895,7 +23895,7 @@ var Vt = { MoveAllAlternatesMatchingHDCP: 2, MoveAllAlternatesMatchingKey: 4 }; -class xT extends ni { +class xT extends nr { constructor(e) { super("error-controller", e.logger), this.hls = void 0, this.playlistError = 0, this.hls = e, this.registerListeners(); } @@ -23928,9 +23928,9 @@ class xT extends ni { var n; if ((n = e.details) != null && n.hasKey(t)) return !0; - const r = e.audioGroups; - if (r) - return this.hls.allAudioTracks.filter((a) => r.indexOf(a.groupId) >= 0).some((a) => { + const i = e.audioGroups; + if (i) + return this.hls.allAudioTracks.filter((a) => i.indexOf(a.groupId) >= 0).some((a) => { var o; return (o = a.details) == null ? void 0 : o.hasKey(t); }); @@ -23947,7 +23947,7 @@ class xT extends ni { var n; if (t.fatal) return; - const r = this.hls, s = t.context; + const i = this.hls, s = t.context; switch (t.details) { case G.FRAG_LOAD_ERROR: case G.FRAG_LOAD_TIMEOUT: @@ -23969,7 +23969,7 @@ class xT extends ni { case G.LEVEL_PARSING_ERROR: { var a; - const l = t.parent === ce.MAIN ? t.level : r.loadLevel; + const l = t.parent === ce.MAIN ? t.level : i.loadLevel; t.details === G.LEVEL_EMPTY_ERROR && ((a = t.context) != null && (a = a.levelDetails) != null && a.live) ? t.errorAction = this.getPlaylistRetryOrSwitchAction(t, l) : (t.levelRetry = !1, t.errorAction = this.getLevelSwitchAction(t, l)); } return; @@ -23982,9 +23982,9 @@ class xT extends ni { case G.SUBTITLE_LOAD_ERROR: case G.SUBTITLE_TRACK_LOAD_TIMEOUT: if (s) { - const l = r.loadLevelObj; + const l = i.loadLevelObj; if (l && (s.type === Be.AUDIO_TRACK && l.hasAudioGroup(s.groupId) || s.type === Be.SUBTITLE_TRACK && l.hasSubtitleGroup(s.groupId))) { - t.errorAction = this.getPlaylistRetryOrSwitchAction(t, r.loadLevel), t.errorAction.action = Vt.SendAlternateToPenaltyBox, t.errorAction.flags = kn.MoveAllAlternatesMatchingHost; + t.errorAction = this.getPlaylistRetryOrSwitchAction(t, i.loadLevel), t.errorAction.action = Vt.SendAlternateToPenaltyBox, t.errorAction.flags = kn.MoveAllAlternatesMatchingHost; return; } } @@ -24008,7 +24008,7 @@ class xT extends ni { case G.BUFFER_APPEND_ERROR: if (!t.errorAction) { var o; - t.errorAction = this.getLevelSwitchAction(t, (o = t.level) != null ? o : r.loadLevel); + t.errorAction = this.getLevelSwitchAction(t, (o = t.level) != null ? o : i.loadLevel); } return; case G.INTERNAL_EXCEPTION: @@ -24024,23 +24024,23 @@ class xT extends ni { t.type === fe.KEY_SYSTEM_ERROR && (t.levelRetry = !1, t.errorAction = $s()); } getPlaylistRetryOrSwitchAction(e, t) { - const n = this.hls, r = Ym(n.config.playlistLoadPolicy, e), s = this.playlistError++; - if (zl(r, s, Gl(e), e.response)) + const n = this.hls, i = Ym(n.config.playlistLoadPolicy, e), s = this.playlistError++; + if (zl(i, s, Gl(e), e.response)) return { action: Vt.RetryRequest, flags: kn.None, - retryConfig: r, + retryConfig: i, retryCount: s }; const o = this.getLevelSwitchAction(e, t); - return r && (o.retryConfig = r, o.retryCount = s), o; + return i && (o.retryConfig = i, o.retryCount = s), o; } getFragRetryOrSwitchAction(e) { - const t = this.hls, n = this.getVariantLevelIndex(e.frag), r = t.levels[n], { + const t = this.hls, n = this.getVariantLevelIndex(e.frag), i = t.levels[n], { fragLoadPolicy: s, keyLoadPolicy: a } = t.config, o = Ym(Vv(e) ? a : s, e), l = t.levels.reduce((c, h) => c + h.fragmentError, 0); - if (r && (e.details !== G.FRAG_GAP && r.fragmentError++, !Kv(e) && zl(o, l, Gl(e), e.response))) + if (i && (e.details !== G.FRAG_GAP && i.fragmentError++, !Kv(e) && zl(o, l, Gl(e), e.response))) return { action: Vt.RetryRequest, flags: kn.None, @@ -24053,11 +24053,11 @@ class xT extends ni { getLevelSwitchAction(e, t) { const n = this.hls; t == null && (t = n.loadLevel); - const r = this.hls.levels[t]; - if (r) { + const i = this.hls.levels[t]; + if (i) { var s, a; const u = e.details; - r.loadError++, u === G.BUFFER_APPEND_ERROR && r.fragmentError++; + i.loadError++, u === G.BUFFER_APPEND_ERROR && i.fragmentError++; let c = -1; const { levels: h, @@ -24068,10 +24068,10 @@ class xT extends ni { !n.autoLevelEnabled && !n.config.preserveManualLevelOnError && (n.loadLevel = -1); const g = (s = e.frag) == null ? void 0 : s.type, b = (g === ce.AUDIO && u === G.FRAG_PARSING_ERROR || e.sourceBufferName === "audio" && (u === G.BUFFER_ADD_CODEC_ERROR || u === G.BUFFER_APPEND_ERROR)) && h.some(({ audioCodec: w - }) => r.audioCodec !== w), v = e.sourceBufferName === "video" && (u === G.BUFFER_ADD_CODEC_ERROR || u === G.BUFFER_APPEND_ERROR) && h.some(({ + }) => i.audioCodec !== w), v = e.sourceBufferName === "video" && (u === G.BUFFER_ADD_CODEC_ERROR || u === G.BUFFER_APPEND_ERROR) && h.some(({ codecSet: w, audioCodec: D - }) => r.codecSet !== w && r.audioCodec === D), { + }) => i.codecSet !== w && i.audioCodec === D), { type: T, groupId: A } = (a = e.context) != null ? a : {}; @@ -24090,7 +24090,7 @@ class xT extends ni { } else { if (T === Be.AUDIO_TRACK && L.hasAudioGroup(A) || T === Be.SUBTITLE_TRACK && L.hasSubtitleGroup(A)) continue; - if (g === ce.AUDIO && (o = r.audioGroups) != null && o.some((I) => L.hasAudioGroup(I)) || g === ce.SUBTITLE && (l = r.subtitleGroups) != null && l.some((I) => L.hasSubtitleGroup(I)) || b && r.audioCodec === L.audioCodec || v && r.codecSet === L.codecSet || !b && r.codecSet !== L.codecSet) + if (g === ce.AUDIO && (o = i.audioGroups) != null && o.some((I) => L.hasAudioGroup(I)) || g === ce.SUBTITLE && (l = i.subtitleGroups) != null && l.some((I) => L.hasSubtitleGroup(I)) || b && i.audioCodec === L.audioCodec || v && i.codecSet === L.codecSet || !b && i.codecSet !== L.codecSet) continue; } c = D; @@ -24128,9 +24128,9 @@ class xT extends ni { if (!n) return; const { - flags: r + flags: i } = n, s = n.nextAutoLevel; - switch (r) { + switch (i) { case kn.None: this.switchLevel(e, s); break; @@ -24167,18 +24167,18 @@ class xT extends ni { } switchLevel(e, t) { if (t !== void 0 && e.errorAction && (this.warn(`switching to level ${t} after ${e.details}`), this.hls.nextAutoLevel = t, e.errorAction.resolved = !0, this.hls.nextLoadLevel = this.hls.nextAutoLevel, e.details === G.BUFFER_ADD_CODEC_ERROR && e.mimeType && e.sourceBufferName !== "audiovideo")) { - const n = Mc(e.mimeType), r = this.hls.levels; - for (let s = r.length; s--; ) - r[s][`${e.sourceBufferName}Codec`] === n && (this.log(`Removing level ${s} for ${e.details} ("${n}" not supported)`), this.hls.removeLevel(s)); + const n = Mc(e.mimeType), i = this.hls.levels; + for (let s = i.length; s--; ) + i[s][`${e.sourceBufferName}Codec`] === n && (this.log(`Removing level ${s} for ${e.details} ("${n}" not supported)`), this.hls.removeLevel(s)); } } } -function $s(i) { +function $s(r) { const e = { action: Vt.DoNothing, flags: kn.None }; - return i && (e.resolved = !0), e; + return r && (e.resolved = !0), e; } var Ot = { NOT_LOADED: "NOT_LOADED", @@ -24215,8 +24215,8 @@ class wT { getAppendedFrag(e, t) { const n = this.activePartLists[t]; if (n) - for (let r = n.length; r--; ) { - const s = n[r]; + for (let i = n.length; i--; ) { + const s = n[i]; if (!s) break; if (s.start <= e && e <= s.end && s.loaded) @@ -24234,10 +24234,10 @@ class wT { } getFragAtPos(e, t, n) { const { - fragments: r - } = this, s = Object.keys(r); + fragments: i + } = this, s = Object.keys(i); for (let a = s.length; a--; ) { - const o = r[s[a]]; + const o = i[s[a]]; if ((o == null ? void 0 : o.body.type) === t && (!n || o.buffered)) { const l = o.body; if (l.start <= e && e <= l.end) @@ -24251,9 +24251,9 @@ class wT { * The browser will unload parts of the buffer to free up memory for new buffer data * Fragments will need to be reloaded when the buffer is freed up, removing partial fragments will allow them to reload(since there might be parts that are still playable) */ - detectEvictedFragments(e, t, n, r, s) { + detectEvictedFragments(e, t, n, i, s) { this.timeRanges && (this.timeRanges[e] = t); - const a = (r == null ? void 0 : r.fragment.sn) || -1; + const a = (i == null ? void 0 : i.fragment.sn) || -1; Object.keys(this.fragments).forEach((o) => { const l = this.fragments[o]; if (!l || a >= l.body.sn) @@ -24283,7 +24283,7 @@ class wT { const t = this.timeRanges; if (!t || e.frag.sn === "initSegment") return; - const n = e.frag, r = ws(n), s = this.fragments[r]; + const n = e.frag, i = ws(n), s = this.fragments[i]; if (!s || s.buffered && n.gap) return; const a = !n.relurl; @@ -24300,34 +24300,34 @@ class wT { } removeParts(e, t) { const n = this.activePartLists[t]; - n && (this.activePartLists[t] = Qm(n, (r) => r.fragment.sn >= e)); + n && (this.activePartLists[t] = Qm(n, (i) => i.fragment.sn >= e)); } fragBuffered(e, t) { const n = ws(e); - let r = this.fragments[n]; - !r && t && (r = this.fragments[n] = { + let i = this.fragments[n]; + !i && t && (i = this.fragments[n] = { body: e, appendedPTS: null, loaded: null, buffered: !1, range: /* @__PURE__ */ Object.create(null) - }, e.gap && (this.hasGaps = !0)), r && (r.loaded = null, this.bufferedEnd(r, e)); + }, e.gap && (this.hasGaps = !0)), i && (i.loaded = null, this.bufferedEnd(i, e)); } - getBufferedTimes(e, t, n, r) { + getBufferedTimes(e, t, n, i) { const s = { time: [], partial: n }, a = e.start, o = e.end, l = e.minEndPTS || o, u = e.maxStartPTS || a; - for (let c = 0; c < r.length; c++) { - const h = r.start(c) - this.bufferPadding, d = r.end(c) + this.bufferPadding; + for (let c = 0; c < i.length; c++) { + const h = i.start(c) - this.bufferPadding, d = i.end(c) + this.bufferPadding; if (u >= h && l <= d) { s.time.push({ - startPTS: Math.max(a, r.start(c)), - endPTS: Math.min(o, r.end(c)) + startPTS: Math.max(a, i.start(c)), + endPTS: Math.min(o, i.end(c)) }); break; } else if (a < d && o > h) { - const f = Math.max(a, r.start(c)), m = Math.min(o, r.end(c)); + const f = Math.max(a, i.start(c)), m = Math.min(o, i.end(c)); m > f && (s.partial = !0, s.time.push({ startPTS: f, endPTS: m @@ -24341,14 +24341,14 @@ class wT { * Gets the partial fragment for a certain time */ getPartialFragment(e) { - let t = null, n, r, s, a = 0; + let t = null, n, i, s, a = 0; const { bufferPadding: o, fragments: l } = this; return Object.keys(l).forEach((u) => { const c = l[u]; - c && No(c) && (r = c.body.start - o, s = c.body.end + o, e >= r && e <= s && (n = Math.min(e - r, s - e), a <= n && (t = c.body, a = n))); + c && No(c) && (i = c.body.start - o, s = c.body.end + o, e >= i && e <= s && (n = Math.min(e - i, s - e), a <= n && (t = c.body, a = n))); }), t; } isEndListAppended(e) { @@ -24360,11 +24360,11 @@ class wT { return n ? n.buffered ? No(n) ? Ot.PARTIAL : Ot.OK : Ot.APPENDING : Ot.NOT_LOADED; } isTimeBuffered(e, t, n) { - let r, s; + let i, s; for (let a = 0; a < n.length; a++) { - if (r = n.start(a) - this.bufferPadding, s = n.end(a) + this.bufferPadding, e >= r && t <= s) + if (i = n.start(a) - this.bufferPadding, s = n.end(a) + this.bufferPadding, e >= i && t <= s) return !0; - if (t <= r) + if (t <= i) return !1; } return !1; @@ -24375,11 +24375,11 @@ class wT { onFragLoaded(e, t) { if (t.frag.sn === "initSegment" || t.frag.bitrateTest) return; - const n = t.frag, r = t.part ? null : t, s = ws(n); + const n = t.frag, i = t.part ? null : t, s = ws(n); this.fragments[s] = { body: n, appendedPTS: null, - loaded: r, + loaded: i, buffered: !1, range: /* @__PURE__ */ Object.create(null) }; @@ -24387,20 +24387,20 @@ class wT { onBufferAppended(e, t) { const { frag: n, - part: r, + part: i, timeRanges: s, type: a } = t; if (n.sn === "initSegment") return; const o = n.type; - if (r) { + if (i) { let u = this.activePartLists[o]; - u || (this.activePartLists[o] = u = []), u.push(r); + u || (this.activePartLists[o] = u = []), u.push(i); } this.timeRanges = s; const l = s[a]; - this.detectEvictedFragments(a, l, o, r); + this.detectEvictedFragments(a, l, o, i); } onFragBuffered(e, t) { this.detectPartialFragments(t); @@ -24415,8 +24415,8 @@ class wT { } = this, n = Object.keys(t); if (!e) return n.length > 0; - for (let r = n.length; r--; ) { - const s = t[n[r]]; + for (let i = n.length; i--; ) { + const s = t[n[i]]; if ((s == null ? void 0 : s.body.type) === e) return !0; } @@ -24426,13 +24426,13 @@ class wT { var t; return !!((t = this.activePartLists[e]) != null && t.length); } - removeFragmentsInRange(e, t, n, r, s) { - r && !this.hasGaps || Object.keys(this.fragments).forEach((a) => { + removeFragmentsInRange(e, t, n, i, s) { + i && !this.hasGaps || Object.keys(this.fragments).forEach((a) => { const o = this.fragments[a]; if (!o) return; const l = o.body; - l.type !== n || r && !l.gap || l.start < t && l.end > e && (o.buffered || s) && this.removeFragment(l); + l.type !== n || i && !l.gap || l.start < t && l.end > e && (o.buffered || s) && this.removeFragment(l); }); } removeFragment(e) { @@ -24440,8 +24440,8 @@ class wT { e.clearElementaryStreamInfo(); const n = this.activePartLists[e.type]; if (n) { - const r = e.sn; - this.activePartLists[e.type] = Qm(n, (s) => s.fragment.sn !== r); + const i = e.sn; + this.activePartLists[e.type] = Qm(n, (s) => s.fragment.sn !== i); } delete this.fragments[t], e.endList && delete this.endListFragments[e.type]; } @@ -24452,20 +24452,20 @@ class wT { t && t.forEach((n) => n.clearElementaryStreamInfo()); } } -function No(i) { +function No(r) { var e, t, n; - return i.buffered && !!(i.body.gap || (e = i.range.video) != null && e.partial || (t = i.range.audio) != null && t.partial || (n = i.range.audiovideo) != null && n.partial); + return r.buffered && !!(r.body.gap || (e = r.range.video) != null && e.partial || (t = r.range.audio) != null && t.partial || (n = r.range.audiovideo) != null && n.partial); } -function ws(i) { - return `${i.type}_${i.level}_${i.sn}`; +function ws(r) { + return `${r.type}_${r.level}_${r.sn}`; } -function Qm(i, e) { - return i.filter((t) => { +function Qm(r, e) { + return r.filter((t) => { const n = e(t); return n || t.clearElementaryStreamInfo(), n; }); } -var Ir = { +var Ii = { cbc: 0, ctr: 1 }; @@ -24475,12 +24475,12 @@ class DT { } decrypt(e, t) { switch (this.aesMode) { - case Ir.cbc: + case Ii.cbc: return this.subtle.decrypt({ name: "AES-CBC", iv: this.aesIV }, t, e); - case Ir.ctr: + case Ii.ctr: return this.subtle.decrypt( { name: "AES-CTR", @@ -24496,9 +24496,9 @@ class DT { } } } -function kT(i) { - const e = i.byteLength, t = e && new DataView(i.buffer).getUint8(e - 1); - return t ? i.slice(0, e - t) : i; +function kT(r) { + const e = r.byteLength, t = e && new DataView(r.buffer).getUint8(e - 1); + return t ? r.slice(0, e - t) : r; } class IT { constructor() { @@ -24507,12 +24507,12 @@ class IT { // Using view.getUint32() also swaps the byte order. uint8ArrayToUint32Array_(e) { const t = new DataView(e), n = new Uint32Array(4); - for (let r = 0; r < 4; r++) - n[r] = t.getUint32(r * 4); + for (let i = 0; i < 4; i++) + n[i] = t.getUint32(i * 4); return n; } initTable() { - const e = this.sBox, t = this.invSBox, n = this.subMix, r = n[0], s = n[1], a = n[2], o = n[3], l = this.invSubMix, u = l[0], c = l[1], h = l[2], d = l[3], f = new Uint32Array(256); + const e = this.sBox, t = this.invSBox, n = this.subMix, i = n[0], s = n[1], a = n[2], o = n[3], l = this.invSubMix, u = l[0], c = l[1], h = l[2], d = l[3], f = new Uint32Array(256); let m = 0, g = 0, p = 0; for (p = 0; p < 256; p++) p < 128 ? f[p] = p << 1 : f[p] = p << 1 ^ 283; @@ -24521,14 +24521,14 @@ class IT { b = b >>> 8 ^ b & 255 ^ 99, e[m] = b, t[b] = m; const y = f[m], v = f[y], T = f[v]; let A = f[b] * 257 ^ b * 16843008; - r[m] = A << 24 | A >>> 8, s[m] = A << 16 | A >>> 16, a[m] = A << 8 | A >>> 24, o[m] = A, A = T * 16843009 ^ v * 65537 ^ y * 257 ^ m * 16843008, u[b] = A << 24 | A >>> 8, c[b] = A << 16 | A >>> 16, h[b] = A << 8 | A >>> 24, d[b] = A, m ? (m = y ^ f[f[f[T ^ y]]], g ^= f[f[g]]) : m = g = 1; + i[m] = A << 24 | A >>> 8, s[m] = A << 16 | A >>> 16, a[m] = A << 8 | A >>> 24, o[m] = A, A = T * 16843009 ^ v * 65537 ^ y * 257 ^ m * 16843008, u[b] = A << 24 | A >>> 8, c[b] = A << 16 | A >>> 16, h[b] = A << 8 | A >>> 24, d[b] = A, m ? (m = y ^ f[f[f[T ^ y]]], g ^= f[f[g]]) : m = g = 1; } } expandKey(e) { const t = this.uint8ArrayToUint32Array_(e); - let n = !0, r = 0; - for (; r < t.length && n; ) - n = t[r] === this.key[r], r++; + let n = !0, i = 0; + for (; i < t.length && n; ) + n = t[i] === this.key[i], i++; if (n) return; this.key = t; @@ -24554,13 +24554,13 @@ class IT { return e << 24 | (e & 65280) << 8 | (e & 16711680) >> 8 | e >>> 24; } decrypt(e, t, n) { - const r = this.keySize + 6, s = this.invKeySchedule, a = this.invSBox, o = this.invSubMix, l = o[0], u = o[1], c = o[2], h = o[3], d = this.uint8ArrayToUint32Array_(n); + const i = this.keySize + 6, s = this.invKeySchedule, a = this.invSBox, o = this.invSubMix, l = o[0], u = o[1], c = o[2], h = o[3], d = this.uint8ArrayToUint32Array_(n); let f = d[0], m = d[1], g = d[2], p = d[3]; const b = new Int32Array(e), y = new Int32Array(b.length); let v, T, A, w, D, L, I, R, M, P, V, U, J, Y; const X = this.networkToHostOrderSwap; for (; t < b.length; ) { - for (M = X(b[t]), P = X(b[t + 1]), V = X(b[t + 2]), U = X(b[t + 3]), D = M ^ s[0], L = U ^ s[1], I = V ^ s[2], R = P ^ s[3], J = 4, Y = 1; Y < r; Y++) + for (M = X(b[t]), P = X(b[t + 1]), V = X(b[t + 2]), U = X(b[t + 3]), D = M ^ s[0], L = U ^ s[1], I = V ^ s[2], R = P ^ s[3], J = 4, Y = 1; Y < i; Y++) v = l[D >>> 24] ^ u[L >> 16 & 255] ^ c[I >> 8 & 255] ^ h[R & 255] ^ s[J], T = l[L >>> 24] ^ u[I >> 16 & 255] ^ c[R >> 8 & 255] ^ h[D & 255] ^ s[J + 1], A = l[I >>> 24] ^ u[R >> 16 & 255] ^ c[D >> 8 & 255] ^ h[L & 255] ^ s[J + 2], w = l[R >>> 24] ^ u[D >> 16 & 255] ^ c[L >> 8 & 255] ^ h[I & 255] ^ s[J + 3], D = v, L = T, I = A, R = w, J = J + 4; v = a[D >>> 24] << 24 ^ a[L >> 16 & 255] << 16 ^ a[I >> 8 & 255] << 8 ^ a[R & 255] ^ s[J], T = a[L >>> 24] << 24 ^ a[I >> 16 & 255] << 16 ^ a[R >> 8 & 255] << 8 ^ a[D & 255] ^ s[J + 1], A = a[I >>> 24] << 24 ^ a[R >> 16 & 255] << 16 ^ a[D >> 8 & 255] << 8 ^ a[L & 255] ^ s[J + 2], w = a[R >>> 24] << 24 ^ a[D >> 16 & 255] << 16 ^ a[L >> 8 & 255] << 8 ^ a[I & 255] ^ s[J + 3], y[t] = X(v ^ f), y[t + 1] = X(w ^ m), y[t + 2] = X(A ^ g), y[t + 3] = X(T ^ p), f = M, m = P, g = V, p = U, t = t + 4; } @@ -24578,14 +24578,14 @@ class LT { }, !1, ["encrypt", "decrypt"]); } } -function RT(i) { - switch (i) { - case Ir.cbc: +function RT(r) { + switch (r) { + case Ii.cbc: return "AES-CBC"; - case Ir.ctr: + case Ii.ctr: return "AES-CTR"; default: - throw new Error(`[FastAESKey] invalid aes mode ${i}`); + throw new Error(`[FastAESKey] invalid aes mode ${r}`); } } const CT = 16; @@ -24620,23 +24620,23 @@ class Xh { reset() { this.currentResult = null, this.currentIV = null, this.remainderData = null, this.softwareDecrypter && (this.softwareDecrypter = null); } - decrypt(e, t, n, r) { + decrypt(e, t, n, i) { return this.useSoftware ? new Promise((s, a) => { const o = ArrayBuffer.isView(e) ? e : new Uint8Array(e); - this.softwareDecrypt(o, t, n, r); + this.softwareDecrypt(o, t, n, i); const l = this.flush(); l ? s(l.buffer) : a(new Error("[softwareDecrypt] Failed to decrypt data")); - }) : this.webCryptoDecrypt(new Uint8Array(e), t, n, r); + }) : this.webCryptoDecrypt(new Uint8Array(e), t, n, i); } // Software decryption is progressive. Progressive decryption may not return a result on each call. Any cached // data is handled in the flush() call - softwareDecrypt(e, t, n, r) { + softwareDecrypt(e, t, n, i) { const { currentIV: s, currentResult: a, remainderData: o } = this; - if (r !== Ir.cbc || t.byteLength !== 16) + if (i !== Ii.cbc || t.byteLength !== 16) return We.warn("SoftwareDecrypt: can only handle AES-128-CBC"), null; this.logOnce("JS AES decrypt"), o && (e = Zn(o, e), this.remainderData = null); const l = this.getValidChunk(e); @@ -24648,18 +24648,18 @@ class Xh { const c = a; return this.currentResult = u.decrypt(l.buffer, 0, n), this.currentIV = l.slice(-16).buffer, c || null; } - webCryptoDecrypt(e, t, n, r) { + webCryptoDecrypt(e, t, n, i) { if (this.key !== t || !this.fastAesKey) { if (!this.subtle) - return Promise.resolve(this.onWebCryptoError(e, t, n, r)); - this.key = t, this.fastAesKey = new LT(this.subtle, t, r); + return Promise.resolve(this.onWebCryptoError(e, t, n, i)); + this.key = t, this.fastAesKey = new LT(this.subtle, t, i); } - return this.fastAesKey.expandKey().then((s) => this.subtle ? (this.logOnce("WebCrypto AES decrypt"), new DT(this.subtle, new Uint8Array(n), r).decrypt(e.buffer, s)) : Promise.reject(new Error("web crypto not initialized"))).catch((s) => (We.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`), this.onWebCryptoError(e, t, n, r))); + return this.fastAesKey.expandKey().then((s) => this.subtle ? (this.logOnce("WebCrypto AES decrypt"), new DT(this.subtle, new Uint8Array(n), i).decrypt(e.buffer, s)) : Promise.reject(new Error("web crypto not initialized"))).catch((s) => (We.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`), this.onWebCryptoError(e, t, n, i))); } - onWebCryptoError(e, t, n, r) { + onWebCryptoError(e, t, n, i) { const s = this.enableSoftwareAES; if (s) { - this.useSoftware = !0, this.logEnabled = !0, this.softwareDecrypt(e, t, n, r); + this.useSoftware = !0, this.logEnabled = !0, this.softwareDecrypt(e, t, n, i); const a = this.flush(); if (a) return a.buffer; @@ -24689,7 +24689,7 @@ class FT { load(e, t) { const n = e.url; if (!n) - return Promise.reject(new Ji({ + return Promise.reject(new Jr({ type: fe.NETWORK_ERROR, details: G.FRAG_LOAD_ERROR, fatal: !1, @@ -24698,7 +24698,7 @@ class FT { networkDetails: null })); this.abort(); - const r = this.config, s = r.fLoader, a = r.loader; + const i = this.config, s = i.fLoader, a = i.loader; return new Promise((o, l) => { if (this.loader && this.loader.destroy(), e.gap) if (e.tagList.some((m) => m[0] === "GAP")) { @@ -24706,9 +24706,9 @@ class FT { return; } else e.gap = !1; - const u = this.loader = s ? new s(r) : new a(r), c = Jm(e); + const u = this.loader = s ? new s(i) : new a(i), c = Jm(e); e.loader = u; - const h = Xm(r.fragLoadPolicy.default), d = { + const h = Xm(i.fragLoadPolicy.default), d = { loadPolicy: h, timeout: h.maxLoadTimeMs, maxRetry: 0, @@ -24729,7 +24729,7 @@ class FT { }); }, onError: (m, g, p, b) => { - this.resetLoader(e, u), l(new Ji({ + this.resetLoader(e, u), l(new Jr({ type: fe.NETWORK_ERROR, details: G.FRAG_LOAD_ERROR, fatal: !1, @@ -24744,7 +24744,7 @@ class FT { })); }, onAbort: (m, g, p) => { - this.resetLoader(e, u), l(new Ji({ + this.resetLoader(e, u), l(new Jr({ type: fe.NETWORK_ERROR, details: G.INTERNAL_ABORTED, fatal: !1, @@ -24755,7 +24755,7 @@ class FT { })); }, onTimeout: (m, g, p) => { - this.resetLoader(e, u), l(new Ji({ + this.resetLoader(e, u), l(new Jr({ type: fe.NETWORK_ERROR, details: G.FRAG_LOAD_TIMEOUT, fatal: !1, @@ -24776,15 +24776,15 @@ class FT { } loadPart(e, t, n) { this.abort(); - const r = this.config, s = r.fLoader, a = r.loader; + const i = this.config, s = i.fLoader, a = i.loader; return new Promise((o, l) => { if (this.loader && this.loader.destroy(), e.gap || t.gap) { l(e1(e, t)); return; } - const u = this.loader = s ? new s(r) : new a(r), c = Jm(e, t); + const u = this.loader = s ? new s(i) : new a(i), c = Jm(e, t); e.loader = u; - const h = Xm(r.fragLoadPolicy.default), d = { + const h = Xm(i.fragLoadPolicy.default), d = { loadPolicy: h, timeout: h.maxLoadTimeMs, maxRetry: 0, @@ -24804,7 +24804,7 @@ class FT { n(b), o(b); }, onError: (f, m, g, p) => { - this.resetLoader(e, u), l(new Ji({ + this.resetLoader(e, u), l(new Jr({ type: fe.NETWORK_ERROR, details: G.FRAG_LOAD_ERROR, fatal: !1, @@ -24820,7 +24820,7 @@ class FT { })); }, onAbort: (f, m, g) => { - e.stats.aborted = t.stats.aborted, this.resetLoader(e, u), l(new Ji({ + e.stats.aborted = t.stats.aborted, this.resetLoader(e, u), l(new Jr({ type: fe.NETWORK_ERROR, details: G.INTERNAL_ABORTED, fatal: !1, @@ -24832,7 +24832,7 @@ class FT { })); }, onTimeout: (f, m, g) => { - this.resetLoader(e, u), l(new Ji({ + this.resetLoader(e, u), l(new Jr({ type: fe.NETWORK_ERROR, details: G.FRAG_LOAD_TIMEOUT, fatal: !1, @@ -24847,60 +24847,60 @@ class FT { }); } updateStatsFromPart(e, t) { - const n = e.stats, r = t.stats, s = r.total; - if (n.loaded += r.loaded, s) { + const n = e.stats, i = t.stats, s = i.total; + if (n.loaded += i.loaded, s) { const l = Math.round(e.duration / t.duration), u = Math.min(Math.round(n.loaded / s), l), h = (l - u) * Math.round(n.loaded / u); n.total = n.loaded + h; } else n.total = Math.max(n.loaded, n.total); - const a = n.loading, o = r.loading; + const a = n.loading, o = i.loading; a.start ? a.first += o.first - o.start : (a.start = o.start, a.first = o.first), a.end = o.end; } resetLoader(e, t) { e.loader = null, this.loader === t && (self.clearTimeout(this.partLoadTimeout), this.loader = null), t.destroy(); } } -function Jm(i, e = null) { - const t = e || i, n = { - frag: i, +function Jm(r, e = null) { + const t = e || r, n = { + frag: r, part: e, responseType: "arraybuffer", url: t.url, headers: {}, rangeStart: 0, rangeEnd: 0 - }, r = t.byteRangeStartOffset, s = t.byteRangeEndOffset; - if (oe(r) && oe(s)) { + }, i = t.byteRangeStartOffset, s = t.byteRangeEndOffset; + if (oe(i) && oe(s)) { var a; - let o = r, l = s; - if (i.sn === "initSegment" && PT((a = i.decryptdata) == null ? void 0 : a.method)) { - const u = s - r; - u % 16 && (l = s + (16 - u % 16)), r !== 0 && (n.resetIV = !0, o = r - 16); + let o = i, l = s; + if (r.sn === "initSegment" && PT((a = r.decryptdata) == null ? void 0 : a.method)) { + const u = s - i; + u % 16 && (l = s + (16 - u % 16)), i !== 0 && (n.resetIV = !0, o = i - 16); } n.rangeStart = o, n.rangeEnd = l; } return n; } -function e1(i, e) { - const t = new Error(`GAP ${i.gap ? "tag" : "attribute"} found`), n = { +function e1(r, e) { + const t = new Error(`GAP ${r.gap ? "tag" : "attribute"} found`), n = { type: fe.MEDIA_ERROR, details: G.FRAG_GAP, fatal: !1, - frag: i, + frag: r, error: t, networkDetails: null }; - return e && (n.part = e), (e || i).stats.aborted = !0, new Ji(n); + return e && (n.part = e), (e || r).stats.aborted = !0, new Jr(n); } -function PT(i) { - return i === "AES-128" || i === "AES-256"; +function PT(r) { + return r === "AES-128" || r === "AES-256"; } -class Ji extends Error { +class Jr extends Error { constructor(e) { super(e.error.message), this.data = void 0, this.data = e; } } -class jv extends ni { +class jv extends nr { constructor(e, t) { super(e, t), this._boundTick = void 0, this._tickTimer = null, this._tickInterval = null, this._tickCallCount = 0, this._boundTick = this.tick.bind(this); } @@ -24956,12 +24956,12 @@ class jv extends ni { } } class Qh { - constructor(e, t, n, r = 0, s = -1, a = !1) { + constructor(e, t, n, i = 0, s = -1, a = !1) { this.level = void 0, this.sn = void 0, this.part = void 0, this.id = void 0, this.size = void 0, this.partial = void 0, this.transmuxing = $o(), this.buffering = { audio: $o(), video: $o(), audiovideo: $o() - }, this.level = e, this.sn = t, this.id = n, this.size = r, this.part = s, this.partial = a; + }, this.level = e, this.sn = t, this.id = n, this.size = i, this.part = s, this.partial = a; } } function $o() { @@ -24984,8 +24984,8 @@ class De { static isBuffered(e, t) { if (e) { const n = De.getBuffered(e); - for (let r = n.length; r--; ) - if (t >= n.start(r) && t <= n.end(r)) + for (let i = n.length; i--; ) + if (t >= n.start(i) && t <= n.end(i)) return !0; } return !1; @@ -25008,9 +25008,9 @@ class De { } static bufferInfo(e, t, n) { if (e) { - const r = De.bufferedRanges(e); - if (r.length) - return De.bufferedInfo(r, t, n); + const i = De.bufferedRanges(e); + if (i.length) + return De.bufferedInfo(i, t, n); } return { len: 0, @@ -25021,10 +25021,10 @@ class De { } static bufferedInfo(e, t, n) { t = Math.max(0, t), e.length > 1 && e.sort((c, h) => c.start - h.start || h.end - c.end); - let r = -1, s = []; + let i = -1, s = []; if (n) for (let c = 0; c < e.length; c++) { - t >= e[c].start && t <= e[c].end && (r = c); + t >= e[c].start && t <= e[c].end && (i = c); const h = s.length; if (h) { const d = s[h - 1].end; @@ -25037,7 +25037,7 @@ class De { let a = 0, o, l = t, u = t; for (let c = 0; c < s.length; c++) { const h = s[c].start, d = s[c].end; - if (r === -1 && t >= h && t <= d && (r = c), t + n >= h && t < d) + if (i === -1 && t >= h && t <= d && (i = c), t + n >= h && t < d) l = h, u = d, a = u - t; else if (t + n < h) { o = h; @@ -25050,7 +25050,7 @@ class De { end: u || 0, nextStart: o, buffered: e, - bufferedIndex: r + bufferedIndex: i }; } /** @@ -25066,47 +25066,47 @@ class De { } } const Wv = /\{\$([a-zA-Z0-9-_]+)\}/g; -function n1(i) { - return Wv.test(i); +function n1(r) { + return Wv.test(r); } -function Nc(i, e) { - if (i.variableList !== null || i.hasVariableRefs) { - const t = i.variableList; +function Nc(r, e) { + if (r.variableList !== null || r.hasVariableRefs) { + const t = r.variableList; return e.replace(Wv, (n) => { - const r = n.substring(2, n.length - 1), s = t == null ? void 0 : t[r]; - return s === void 0 ? (i.playlistParsingError || (i.playlistParsingError = new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)), n) : s; + const i = n.substring(2, n.length - 1), s = t == null ? void 0 : t[i]; + return s === void 0 ? (r.playlistParsingError || (r.playlistParsingError = new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)), n) : s; }); } return e; } -function i1(i, e, t) { - let n = i.variableList; - n || (i.variableList = n = {}); - let r, s; +function r1(r, e, t) { + let n = r.variableList; + n || (r.variableList = n = {}); + let i, s; if ("QUERYPARAM" in e) { - r = e.QUERYPARAM; + i = e.QUERYPARAM; try { const a = new self.URL(t).searchParams; - if (a.has(r)) - s = a.get(r); + if (a.has(i)) + s = a.get(i); else - throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`); + throw new Error(`"${i}" does not match any query parameter in URI: "${t}"`); } catch (a) { - i.playlistParsingError || (i.playlistParsingError = new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`)); + r.playlistParsingError || (r.playlistParsingError = new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`)); } } else - r = e.NAME, s = e.VALUE; - r in n ? i.playlistParsingError || (i.playlistParsingError = new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)) : n[r] = s || ""; + i = e.NAME, s = e.VALUE; + i in n ? r.playlistParsingError || (r.playlistParsingError = new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)) : n[i] = s || ""; } -function MT(i, e, t) { +function MT(r, e, t) { const n = e.IMPORT; if (t && n in t) { - let r = i.variableList; - r || (i.variableList = r = {}), r[n] = t[n]; + let i = r.variableList; + i || (r.variableList = i = {}), i[n] = t[n]; } else - i.playlistParsingError || (i.playlistParsingError = new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`)); + r.playlistParsingError || (r.playlistParsingError = new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`)); } -const OT = /^(\d+)x(\d+)$/, r1 = /(.+?)=(".*?"|.*?)(?:,|$)/g; +const OT = /^(\d+)x(\d+)$/, i1 = /(.+?)=(".*?"|.*?)(?:,|$)/g; class ct { constructor(e, t) { typeof e == "string" && (e = ct.parseAttrList(e, t)), Qe(this, e); @@ -25123,8 +25123,8 @@ class ct { let t = (this[e] || "0x").slice(2); t = (t.length & 1 ? "0" : "") + t; const n = new Uint8Array(t.length / 2); - for (let r = 0; r < t.length / 2; r++) - n[r] = parseInt(t.slice(r * 2, r * 2 + 2), 16); + for (let i = 0; i < t.length / 2; i++) + n[i] = parseInt(t.slice(i * 2, i * 2 + 2), 16); return n; } return null; @@ -25145,7 +25145,7 @@ class ct { } enumeratedStringList(e, t) { const n = this[e]; - return (n ? n.split(/[ ,]+/) : []).reduce((r, s) => (r[s.toLowerCase()] = !0, r), t); + return (n ? n.split(/[ ,]+/) : []).reduce((i, s) => (i[s.toLowerCase()] = !0, i), t); } bool(e) { return this[e] === "YES"; @@ -25160,8 +25160,8 @@ class ct { } static parseAttrList(e, t) { let n; - const r = {}, s = '"'; - for (r1.lastIndex = 0; (n = r1.exec(e)) !== null; ) { + const i = {}, s = '"'; + for (i1.lastIndex = 0; (n = i1.exec(e)) !== null; ) { const a = n[1].trim(); let o = n[2]; const l = o.indexOf(s) === 0 && o.lastIndexOf(s) === o.length - 1; @@ -25217,22 +25217,22 @@ class ct { case "X-ASSET-URI": We.warn(`${e}: attribute ${a} is missing quotes`); } - r[a] = o; + i[a] = o; } - return r; + return i; } } const BT = "com.apple.hls.interstitial"; -function NT(i) { - return i !== "ID" && i !== "CLASS" && i !== "CUE" && i !== "START-DATE" && i !== "DURATION" && i !== "END-DATE" && i !== "END-ON-NEXT"; +function NT(r) { + return r !== "ID" && r !== "CLASS" && r !== "CUE" && r !== "START-DATE" && r !== "DURATION" && r !== "END-DATE" && r !== "END-ON-NEXT"; } -function $T(i) { - return i === "SCTE35-OUT" || i === "SCTE35-IN" || i === "SCTE35-CMD"; +function $T(r) { + return r === "SCTE35-OUT" || r === "SCTE35-IN" || r === "SCTE35-CMD"; } class Yv { constructor(e, t, n = 0) { - var r; - if (this.attr = void 0, this.tagAnchor = void 0, this.tagOrder = void 0, this._startDate = void 0, this._endDate = void 0, this._dateAtEnd = void 0, this._cue = void 0, this._badValueForSameId = void 0, this.tagAnchor = (t == null ? void 0 : t.tagAnchor) || null, this.tagOrder = (r = t == null ? void 0 : t.tagOrder) != null ? r : n, t) { + var i; + if (this.attr = void 0, this.tagAnchor = void 0, this.tagOrder = void 0, this._startDate = void 0, this._endDate = void 0, this._dateAtEnd = void 0, this._cue = void 0, this._badValueForSameId = void 0, this.tagAnchor = (t == null ? void 0 : t.tagAnchor) || null, this.tagOrder = (i = t == null ? void 0 : t.tagOrder) != null ? i : n, t) { const s = t.attr; for (const a in s) if (Object.prototype.hasOwnProperty.call(e, a) && e[a] !== s[a]) { @@ -25372,50 +25372,50 @@ class HT { return !1; } } -function ql(i, e) { - return i.length === e.length ? !i.some((t, n) => t !== e[n]) : !1; +function ql(r, e) { + return r.length === e.length ? !r.some((t, n) => t !== e[n]) : !1; } -function s1(i, e) { - return !i && !e ? !0 : !i || !e ? !1 : ql(i, e); +function s1(r, e) { + return !r && !e ? !0 : !r || !e ? !1 : ql(r, e); } -function Us(i) { - return i === "AES-128" || i === "AES-256" || i === "AES-256-CTR"; +function Us(r) { + return r === "AES-128" || r === "AES-256" || r === "AES-256-CTR"; } -function Zh(i) { - switch (i) { +function Zh(r) { + switch (r) { case "AES-128": case "AES-256": - return Ir.cbc; + return Ii.cbc; case "AES-256-CTR": - return Ir.ctr; + return Ii.ctr; default: - throw new Error(`invalid full segment method ${i}`); + throw new Error(`invalid full segment method ${r}`); } } -function Jh(i) { - return Uint8Array.from(atob(i), (e) => e.charCodeAt(0)); +function Jh(r) { + return Uint8Array.from(atob(r), (e) => e.charCodeAt(0)); } -function $c(i) { - return Uint8Array.from(unescape(encodeURIComponent(i)), (e) => e.charCodeAt(0)); +function $c(r) { + return Uint8Array.from(unescape(encodeURIComponent(r)), (e) => e.charCodeAt(0)); } -function GT(i) { - const e = $c(i).subarray(0, 16), t = new Uint8Array(16); +function GT(r) { + const e = $c(r).subarray(0, 16), t = new Uint8Array(16); return t.set(e, 16 - e.length), t; } -function Xv(i) { - const e = function(n, r, s) { - const a = n[r]; - n[r] = n[s], n[s] = a; +function Xv(r) { + const e = function(n, i, s) { + const a = n[i]; + n[i] = n[s], n[s] = a; }; - e(i, 0, 3), e(i, 1, 2), e(i, 4, 5), e(i, 6, 7); + e(r, 0, 3), e(r, 1, 2), e(r, 4, 5), e(r, 6, 7); } -function Qv(i) { - const e = i.split(":"); +function Qv(r) { + const e = r.split(":"); let t = null; if (e[0] === "data" && e.length === 2) { - const n = e[1].split(";"), r = n[n.length - 1].split(","); - if (r.length === 2) { - const s = r[0] === "base64", a = r[1]; + const n = e[1].split(";"), i = n[n.length - 1].split(","); + if (i.length === 2) { + const s = i[0] === "base64", a = i[1]; s ? (n.splice(-1, 1), t = Jh(a)) : t = GT(a); } } @@ -25433,8 +25433,8 @@ var dt = { PLAYREADY: "com.microsoft.playready", WIDEVINE: "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" }; -function ul(i) { - switch (i) { +function ul(r) { + switch (r) { case jt.FAIRPLAY: return dt.FAIRPLAY; case jt.PLAYREADY: @@ -25445,8 +25445,8 @@ function ul(i) { return dt.CLEARKEY; } } -function Cu(i) { - switch (i) { +function Cu(r) { + switch (r) { case dt.FAIRPLAY: return jt.FAIRPLAY; case dt.PLAYREADY: @@ -25457,37 +25457,37 @@ function Cu(i) { return jt.CLEARKEY; } } -function Aa(i) { +function Aa(r) { const { drmSystems: e, widevineLicenseUrl: t - } = i, n = e ? [dt.FAIRPLAY, dt.WIDEVINE, dt.PLAYREADY, dt.CLEARKEY].filter((r) => !!e[r]) : []; + } = r, n = e ? [dt.FAIRPLAY, dt.WIDEVINE, dt.PLAYREADY, dt.CLEARKEY].filter((i) => !!e[i]) : []; return !n[dt.WIDEVINE] && t && n.push(dt.WIDEVINE), n; } -const Zv = function(i) { - return Vl != null && (i = Vl.navigator) != null && i.requestMediaKeySystemAccess ? self.navigator.requestMediaKeySystemAccess.bind(self.navigator) : null; +const Zv = function(r) { + return Vl != null && (r = Vl.navigator) != null && r.requestMediaKeySystemAccess ? self.navigator.requestMediaKeySystemAccess.bind(self.navigator) : null; }(); -function zT(i, e, t, n) { - let r; - switch (i) { +function zT(r, e, t, n) { + let i; + switch (r) { case dt.FAIRPLAY: - r = ["cenc", "sinf"]; + i = ["cenc", "sinf"]; break; case dt.WIDEVINE: case dt.PLAYREADY: - r = ["cenc"]; + i = ["cenc"]; break; case dt.CLEARKEY: - r = ["cenc", "keyids"]; + i = ["cenc", "keyids"]; break; default: - throw new Error(`Unknown key-system: ${i}`); + throw new Error(`Unknown key-system: ${r}`); } - return qT(r, e, t, n); + return qT(i, e, t, n); } -function qT(i, e, t, n) { +function qT(r, e, t, n) { return [{ - initDataTypes: i, + initDataTypes: r, persistentState: n.persistentState || "optional", distinctiveIdentifier: n.distinctiveIdentifier || "optional", sessionTypes: n.sessionTypes || [n.sessionType || "temporary"], @@ -25503,12 +25503,12 @@ function qT(i, e, t, n) { })) }]; } -function VT(i) { +function VT(r) { var e; - return !!i && (i.sessionType === "persistent-license" || !!((e = i.sessionTypes) != null && e.some((t) => t === "persistent-license"))); + return !!r && (r.sessionType === "persistent-license" || !!((e = r.sessionTypes) != null && e.some((t) => t === "persistent-license"))); } -function Jv(i) { - const e = new Uint16Array(i.buffer, i.byteOffset, i.byteLength / 2), t = String.fromCharCode.apply(null, Array.from(e)), n = t.substring(t.indexOf("<"), t.length), a = new DOMParser().parseFromString(n, "text/xml").getElementsByTagName("KID")[0]; +function Jv(r) { + const e = new Uint16Array(r.buffer, r.byteOffset, r.byteLength / 2), t = String.fromCharCode.apply(null, Array.from(e)), n = t.substring(t.indexOf("<"), t.length), a = new DOMParser().parseFromString(n, "text/xml").getElementsByTagName("KID")[0]; if (a) { const o = a.childNodes[0] ? a.childNodes[0].nodeValue : a.getAttribute("VALUE"); if (o) { @@ -25519,7 +25519,7 @@ function Jv(i) { return null; } let Ds = {}; -class Ar { +class Ai { static clearKeyUriToKeyIdMap() { Ds = {}; } @@ -25530,8 +25530,8 @@ class Ar { const t = Object.keys(Ds).length % Number.MAX_SAFE_INTEGER, n = new Uint8Array(16); return new DataView(n.buffer, 12, 4).setUint32(0, t), Ds[e] = n, n; } - constructor(e, t, n, r = [1], s = null, a) { - this.uri = void 0, this.method = void 0, this.keyFormat = void 0, this.keyFormatVersions = void 0, this.encrypted = void 0, this.isCommonEncryption = void 0, this.iv = null, this.key = null, this.keyId = null, this.pssh = null, this.method = e, this.uri = t, this.keyFormat = n, this.keyFormatVersions = r, this.iv = s, this.encrypted = e ? e !== "NONE" : !1, this.isCommonEncryption = this.encrypted && !Us(e), a != null && a.startsWith("0x") && (this.keyId = new Uint8Array(Dv(a))); + constructor(e, t, n, i = [1], s = null, a) { + this.uri = void 0, this.method = void 0, this.keyFormat = void 0, this.keyFormatVersions = void 0, this.encrypted = void 0, this.isCommonEncryption = void 0, this.iv = null, this.key = null, this.keyId = null, this.pssh = null, this.method = e, this.uri = t, this.keyFormat = n, this.keyFormatVersions = i, this.iv = s, this.encrypted = e ? e !== "NONE" : !1, this.isCommonEncryption = this.encrypted && !Us(e), a != null && a.startsWith("0x") && (this.keyId = new Uint8Array(Dv(a))); } matches(e) { return e.uri === this.uri && e.method === this.method && e.encrypted === this.encrypted && e.keyFormat === this.keyFormat && ql(e.keyFormatVersions, this.keyFormatVersions) && s1(e.iv, this.iv) && s1(e.keyId, this.keyId); @@ -25557,11 +25557,11 @@ class Ar { return null; if (Us(this.method)) { let s = this.iv; - return s || (typeof e != "number" && (We.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`), e = 0), s = jT(e)), new Ar(this.method, this.uri, "identity", this.keyFormatVersions, s); + return s || (typeof e != "number" && (We.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`), e = 0), s = jT(e)), new Ai(this.method, this.uri, "identity", this.keyFormatVersions, s); } if (this.keyId) { const s = Ds[this.uri]; - if (s && !ql(this.keyId, s) && Ar.setKeyIdForUri(this.uri, this.keyId), this.pssh) + if (s && !ql(this.keyId, s) && Ai.setKeyIdForUri(this.uri, this.keyId), this.pssh) return this; } const n = Qv(this.uri); @@ -25571,9 +25571,9 @@ class Ar { if (this.pssh = n, !this.keyId) { const s = XS(n.buffer); if (s.length) { - var r; + var i; const a = s[0]; - this.keyId = (r = a.kids) != null && r.length ? a.kids[0] : null; + this.keyId = (i = a.kids) != null && i.length ? a.kids[0] : null; } } this.keyId || (this.keyId = a1(t)); @@ -25595,17 +25595,17 @@ class Ar { } if (!this.keyId || this.keyId.byteLength !== 16) { let s; - s = KT(t), s || (s = a1(t), s || (s = Ds[this.uri])), s && (this.keyId = s, Ar.setKeyIdForUri(this.uri, s)); + s = KT(t), s || (s = a1(t), s || (s = Ds[this.uri])), s && (this.keyId = s, Ai.setKeyIdForUri(this.uri, s)); } return this; } } -function KT(i) { - const e = i == null ? void 0 : i[jt.WIDEVINE]; +function KT(r) { + const e = r == null ? void 0 : r[jt.WIDEVINE]; return e ? e.keyId : null; } -function a1(i) { - const e = i == null ? void 0 : i[jt.PLAYREADY]; +function a1(r) { + const e = r == null ? void 0 : r[jt.PLAYREADY]; if (e) { const t = Qv(e.uri); if (t) @@ -25613,10 +25613,10 @@ function a1(i) { } return null; } -function jT(i) { +function jT(r) { const e = new Uint8Array(16); for (let t = 12; t < 16; t++) - e[t] = i >> 8 * (15 - t) & 255; + e[t] = r >> 8 * (15 - t) & 255; return e; } const o1 = /#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g, l1 = /#EXT-X-MEDIA:(.*)/g, WT = /^#EXT(?:INF|-X-TARGETDURATION):/m, Fu = new RegExp([ @@ -25627,12 +25627,12 @@ const o1 = /#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT /#.*/.source // All other non-segment oriented tags will match with all groups empty ].join("|"), "g"), YT = new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source, /#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source, /#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source, /(#)([^:]*):(.*)/.source, /(#)(.*)(?:.*)\r?\n?/.source].join("|")); -class Pi { +class Pr { static findGroup(e, t) { for (let n = 0; n < e.length; n++) { - const r = e[n]; - if (r.id === t) - return r; + const i = e[n]; + if (i.id === t) + return i; } } static resolve(e, t) { @@ -25644,7 +25644,7 @@ class Pi { return WT.test(e); } static parseMasterPlaylist(e, t) { - const n = n1(e), r = { + const n = n1(e), i = { contentSteering: null, levels: [], playlistParsingError: null, @@ -25655,59 +25655,59 @@ class Pi { hasVariableRefs: n }, s = []; if (o1.lastIndex = 0, !e.startsWith("#EXTM3U")) - return r.playlistParsingError = new Error("no EXTM3U delimiter"), r; + return i.playlistParsingError = new Error("no EXTM3U delimiter"), i; let a; for (; (a = o1.exec(e)) != null; ) if (a[1]) { var o; - const u = new ct(a[1], r), c = Nc(r, a[2]), h = { + const u = new ct(a[1], i), c = Nc(i, a[2]), h = { attrs: u, bitrate: u.decimalInteger("BANDWIDTH") || u.decimalInteger("AVERAGE-BANDWIDTH"), name: u.NAME, - url: Pi.resolve(c, t) + url: Pr.resolve(c, t) }, d = u.decimalResolution("RESOLUTION"); d && (h.width = d.width, h.height = d.height), h1(u.CODECS, h); const f = u["SUPPLEMENTAL-CODECS"]; - f && (h.supplemental = {}, h1(f, h.supplemental)), (o = h.unknownCodecs) != null && o.length || s.push(h), r.levels.push(h); + f && (h.supplemental = {}, h1(f, h.supplemental)), (o = h.unknownCodecs) != null && o.length || s.push(h), i.levels.push(h); } else if (a[3]) { const u = a[3], c = a[4]; switch (u) { case "SESSION-DATA": { - const h = new ct(c, r), d = h["DATA-ID"]; - d && (r.sessionData === null && (r.sessionData = {}), r.sessionData[d] = h); + const h = new ct(c, i), d = h["DATA-ID"]; + d && (i.sessionData === null && (i.sessionData = {}), i.sessionData[d] = h); break; } case "SESSION-KEY": { - const h = u1(c, t, r); - h.encrypted && h.isSupported() ? (r.sessionKeys === null && (r.sessionKeys = []), r.sessionKeys.push(h)) : We.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${c}"`); + const h = u1(c, t, i); + h.encrypted && h.isSupported() ? (i.sessionKeys === null && (i.sessionKeys = []), i.sessionKeys.push(h)) : We.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${c}"`); break; } case "DEFINE": { { - const h = new ct(c, r); - i1(r, h, t); + const h = new ct(c, i); + r1(i, h, t); } break; } case "CONTENT-STEERING": { - const h = new ct(c, r); - r.contentSteering = { - uri: Pi.resolve(h["SERVER-URI"], t), + const h = new ct(c, i); + i.contentSteering = { + uri: Pr.resolve(h["SERVER-URI"], t), pathwayId: h["PATHWAY-ID"] || "." }; break; } case "START": { - r.startTimeOffset = c1(c); + i.startTimeOffset = c1(c); break; } } } - const l = s.length > 0 && s.length < r.levels.length; - return r.levels = l ? s : r.levels, r.levels.length === 0 && (r.playlistParsingError = new Error("no levels found in manifest")), r; + const l = s.length > 0 && s.length < i.levels.length; + return i.levels = l ? s : i.levels, i.levels.length === 0 && (i.playlistParsingError = new Error("no levels found in manifest")), i; } static parseMasterPlaylistMedia(e, t, n) { - let r; + let i; const s = {}, a = n.levels, o = { AUDIO: a.map((u) => ({ id: u.attrs.AUDIO, @@ -25720,8 +25720,8 @@ class Pi { "CLOSED-CAPTIONS": [] }; let l = 0; - for (l1.lastIndex = 0; (r = l1.exec(e)) !== null; ) { - const u = new ct(r[1], n), c = u.TYPE; + for (l1.lastIndex = 0; (i = l1.exec(e)) !== null; ) { + const u = new ct(i[1], n), c = u.TYPE; if (c) { const h = o[c], d = s[c] || []; s[c] = d; @@ -25736,10 +25736,10 @@ class Pi { autoselect: u.bool("AUTOSELECT"), forced: u.bool("FORCED"), lang: f, - url: u.URI ? Pi.resolve(u.URI, t) : "" + url: u.URI ? Pr.resolve(u.URI, t) : "" }; if (m && (y.assocLang = m), g && (y.channels = g), p && (y.characteristics = p), b && (y.instreamId = b), h != null && h.length) { - const v = Pi.findGroup(h, y.groupId) || h[0]; + const v = Pr.findGroup(h, y.groupId) || h[0]; d1(y, v, "audioCodec"), d1(y, v, "textCodec"); } d.push(y); @@ -25747,16 +25747,16 @@ class Pi { } return s; } - static parseLevelPlaylist(e, t, n, r, s, a) { + static parseLevelPlaylist(e, t, n, i, s, a) { var o; const l = { url: t }, u = new HT(t), c = u.fragments, h = []; - let d = null, f = 0, m = 0, g = 0, p = 0, b = 0, y = null, v = new Iu(r, l), T, A, w, D = -1, L = !1, I = null, R; + let d = null, f = 0, m = 0, g = 0, p = 0, b = 0, y = null, v = new Iu(i, l), T, A, w, D = -1, L = !1, I = null, R; if (Fu.lastIndex = 0, u.m3u8 = e, u.hasVariableRefs = n1(e), ((o = Fu.exec(e)) == null ? void 0 : o[0]) !== "#EXTM3U") return u.playlistParsingError = new Error("Missing format identifier #EXTM3U"), u; for (; (T = Fu.exec(e)) !== null; ) { - L && (L = !1, v = new Iu(r, l), v.playlistOffset = g, v.setStart(g), v.sn = f, v.cc = p, b && (v.bitrate = b), v.level = n, d && (v.initSegment = d, d.rawProgramDateTime && (v.rawProgramDateTime = d.rawProgramDateTime, d.rawProgramDateTime = null), I && (v.setByteRange(I), I = null))); + L && (L = !1, v = new Iu(i, l), v.playlistOffset = g, v.setStart(g), v.sn = f, v.cc = p, b && (v.bitrate = b), v.level = n, d && (v.initSegment = d, d.rawProgramDateTime && (v.rawProgramDateTime = d.rawProgramDateTime, d.rawProgramDateTime = null), I && (v.setByteRange(I), I = null))); const U = T[1]; if (U) { v.duration = parseFloat(U); @@ -25784,13 +25784,13 @@ class Pi { v.rawProgramDateTime = Y, v.tagList.push(["PROGRAM-DATE-TIME", Y]), D === -1 && (D = c.length); break; case "PLAYLIST-TYPE": - u.type && Xi(u, J, T), u.type = Y.toUpperCase(); + u.type && Xr(u, J, T), u.type = Y.toUpperCase(); break; case "MEDIA-SEQUENCE": - u.startSN !== 0 ? Xi(u, J, T) : c.length > 0 && g1(u, J, T), f = u.startSN = parseInt(Y); + u.startSN !== 0 ? Xr(u, J, T) : c.length > 0 && g1(u, J, T), f = u.startSN = parseInt(Y); break; case "SKIP": { - u.skippedSegments && Xi(u, J, T); + u.skippedSegments && Xr(u, J, T); const $ = new ct(Y, u), Z = $.decimalInteger("SKIPPED-SEGMENTS"); if (oe(Z)) { u.skippedSegments += Z; @@ -25803,15 +25803,15 @@ class Pi { break; } case "TARGETDURATION": - u.targetduration !== 0 && Xi(u, J, T), u.targetduration = Math.max(parseInt(Y), 1); + u.targetduration !== 0 && Xr(u, J, T), u.targetduration = Math.max(parseInt(Y), 1); break; case "VERSION": - u.version !== null && Xi(u, J, T), u.version = parseInt(Y); + u.version !== null && Xr(u, J, T), u.version = parseInt(Y); break; case "INDEPENDENT-SEGMENTS": break; case "ENDLIST": - u.live || Xi(u, J, T), u.live = !1; + u.live || Xr(u, J, T), u.live = !1; break; case "#": (Y || X) && v.tagList.push(X ? [Y, X] : [Y]); @@ -25833,12 +25833,12 @@ class Pi { case "DEFINE": { { const $ = new ct(Y, u); - "IMPORT" in $ ? MT(u, $, a) : i1(u, $, t); + "IMPORT" in $ ? MT(u, $, a) : r1(u, $, t); } break; } case "DISCONTINUITY-SEQUENCE": - u.startCC !== 0 ? Xi(u, J, T) : c.length > 0 && g1(u, J, T), u.startCC = p = parseInt(Y); + u.startCC !== 0 ? Xr(u, J, T) : c.length > 0 && g1(u, J, T), u.startCC = p = parseInt(Y); break; case "KEY": { const $ = u1(Y, t, u); @@ -25860,7 +25860,7 @@ class Pi { case "MAP": { const $ = new ct(Y, u); if (v.duration) { - const Z = new Iu(r, l); + const Z = new Iu(i, l); f1(Z, $, n, w), d = Z, v.initSegment = d, d.rawProgramDateTime && !v.rawProgramDateTime && (v.rawProgramDateTime = d.rawProgramDateTime); } else { const Z = v.byteRangeEndOffset; @@ -25875,11 +25875,11 @@ class Pi { break; } case "SERVER-CONTROL": { - R && Xi(u, J, T), R = new ct(Y), u.canBlockReload = R.bool("CAN-BLOCK-RELOAD"), u.canSkipUntil = R.optionalFloat("CAN-SKIP-UNTIL", 0), u.canSkipDateRanges = u.canSkipUntil > 0 && R.bool("CAN-SKIP-DATERANGES"), u.partHoldBack = R.optionalFloat("PART-HOLD-BACK", 0), u.holdBack = R.optionalFloat("HOLD-BACK", 0); + R && Xr(u, J, T), R = new ct(Y), u.canBlockReload = R.bool("CAN-BLOCK-RELOAD"), u.canSkipUntil = R.optionalFloat("CAN-SKIP-UNTIL", 0), u.canSkipDateRanges = u.canSkipUntil > 0 && R.bool("CAN-SKIP-DATERANGES"), u.partHoldBack = R.optionalFloat("PART-HOLD-BACK", 0), u.holdBack = R.optionalFloat("HOLD-BACK", 0); break; } case "PART-INF": { - u.partTarget && Xi(u, J, T); + u.partTarget && Xr(u, J, T); const $ = new ct(Y); u.partTarget = $.decimalFloatingPoint("PART-TARGET"); break; @@ -25917,23 +25917,23 @@ class Pi { return u.fragmentHint && (g += u.fragmentHint.duration), u.totalduration = g, h.length && u.dateRangeTagCount && P && e2(h, u), u.endCC = p, u; } } -function e2(i, e) { - let t = i.length; +function e2(r, e) { + let t = r.length; if (!t) if (e.hasProgramDateTime) { const o = e.fragments[e.fragments.length - 1]; - i.push(o), t++; + r.push(o), t++; } else return; - const n = i[t - 1], r = e.live ? 1 / 0 : e.totalduration, s = Object.keys(e.dateRanges); + const n = r[t - 1], i = e.live ? 1 / 0 : e.totalduration, s = Object.keys(e.dateRanges); for (let o = s.length; o--; ) { const l = e.dateRanges[s[o]], u = l.startDate.getTime(); l.tagAnchor = n.ref; for (let c = t; c--; ) { var a; - if (((a = i[c]) == null ? void 0 : a.sn) < e.startSN) + if (((a = r[c]) == null ? void 0 : a.sn) < e.startSN) break; - const h = XT(e, u, i, c, r); + const h = XT(e, u, r, c, i); if (h !== -1) { l.tagAnchor = e.fragments[h].ref; break; @@ -25941,20 +25941,20 @@ function e2(i, e) { } } } -function XT(i, e, t, n, r) { +function XT(r, e, t, n, i) { const s = t[n]; if (s) { const o = s.programDateTime; if (e >= o || n === 0) { var a; - const l = (((a = t[n + 1]) == null ? void 0 : a.start) || r) - s.start; + const l = (((a = t[n + 1]) == null ? void 0 : a.start) || i) - s.start; if (e <= o + l * 1e3) { - const u = t[n].sn - i.startSN; + const u = t[n].sn - r.startSN; if (u < 0) return -1; - const c = i.fragments; + const c = r.fragments; if (c.length > t.length) { - const d = (t[n + 1] || c[c.length - 1]).sn - i.startSN; + const d = (t[n + 1] || c[c.length - 1]).sn - r.startSN; for (let f = d; f > u; f--) { const m = c[f].programDateTime; if (e >= m && e < m + c[f].duration * 1e3) @@ -25967,99 +25967,99 @@ function XT(i, e, t, n, r) { } return -1; } -function u1(i, e, t) { - var n, r; - const s = new ct(i, t), a = (n = s.METHOD) != null ? n : "", o = s.URI, l = s.hexadecimalInteger("IV"), u = s.KEYFORMATVERSIONS, c = (r = s.KEYFORMAT) != null ? r : "identity"; +function u1(r, e, t) { + var n, i; + const s = new ct(r, t), a = (n = s.METHOD) != null ? n : "", o = s.URI, l = s.hexadecimalInteger("IV"), u = s.KEYFORMATVERSIONS, c = (i = s.KEYFORMAT) != null ? i : "identity"; o && s.IV && !l && We.error(`Invalid IV: ${s.IV}`); - const h = o ? Pi.resolve(o, e) : "", d = (u || "1").split("/").map(Number).filter(Number.isFinite); - return new Ar(a, h, c, d, l, s.KEYID); + const h = o ? Pr.resolve(o, e) : "", d = (u || "1").split("/").map(Number).filter(Number.isFinite); + return new Ai(a, h, c, d, l, s.KEYID); } -function c1(i) { - const t = new ct(i).decimalFloatingPoint("TIME-OFFSET"); +function c1(r) { + const t = new ct(r).decimalFloatingPoint("TIME-OFFSET"); return oe(t) ? t : null; } -function h1(i, e) { - let t = (i || "").split(/[ ,]+/).filter((n) => n); +function h1(r, e) { + let t = (r || "").split(/[ ,]+/).filter((n) => n); ["video", "audio", "text"].forEach((n) => { - const r = t.filter((s) => jh(s, n)); - r.length && (e[`${n}Codec`] = r.map((s) => s.split("/")[0]).join(","), t = t.filter((s) => r.indexOf(s) === -1)); + const i = t.filter((s) => jh(s, n)); + i.length && (e[`${n}Codec`] = i.map((s) => s.split("/")[0]).join(","), t = t.filter((s) => i.indexOf(s) === -1)); }), e.unknownCodecs = t; } -function d1(i, e, t) { +function d1(r, e, t) { const n = e[t]; - n && (i[t] = n); + n && (r[t] = n); } -function QT(i, e) { - let t = i[e]; +function QT(r, e) { + let t = r[e]; for (let n = e; n--; ) { - const r = i[n]; - if (!r) + const i = r[n]; + if (!i) return; - r.programDateTime = t.programDateTime - r.duration * 1e3, t = r; + i.programDateTime = t.programDateTime - i.duration * 1e3, t = i; } } -function Uc(i, e, t) { - i.rawProgramDateTime ? t.push(i) : e != null && e.programDateTime && (i.programDateTime = e.endProgramDateTime); +function Uc(r, e, t) { + r.rawProgramDateTime ? t.push(r) : e != null && e.programDateTime && (r.programDateTime = e.endProgramDateTime); } -function f1(i, e, t, n) { - i.relurl = e.URI, e.BYTERANGE && i.setByteRange(e.BYTERANGE), i.level = t, i.sn = "initSegment", n && (i.levelkeys = n), i.initSegment = null; +function f1(r, e, t, n) { + r.relurl = e.URI, e.BYTERANGE && r.setByteRange(e.BYTERANGE), r.level = t, r.sn = "initSegment", n && (r.levelkeys = n), r.initSegment = null; } -function m1(i, e, t) { - i.levelkeys = e; +function m1(r, e, t) { + r.levelkeys = e; const { encryptedFragments: n } = t; - (!n.length || n[n.length - 1].levelkeys !== e) && Object.keys(e).some((r) => e[r].isCommonEncryption) && n.push(i); + (!n.length || n[n.length - 1].levelkeys !== e) && Object.keys(e).some((i) => e[i].isCommonEncryption) && n.push(r); } -function Xi(i, e, t) { - i.playlistParsingError = new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`); +function Xr(r, e, t) { + r.playlistParsingError = new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`); } -function g1(i, e, t) { - i.playlistParsingError = new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`); +function g1(r, e, t) { + r.playlistParsingError = new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`); } -function Pu(i, e) { +function Pu(r, e) { const t = e.startPTS; if (oe(t)) { - let n = 0, r; - e.sn > i.sn ? (n = t - i.start, r = i) : (n = i.start - t, r = e), r.duration !== n && r.setDuration(n); - } else e.sn > i.sn ? i.cc === e.cc && i.minEndPTS ? e.setStart(i.start + (i.minEndPTS - i.start)) : e.setStart(i.start + i.duration) : e.setStart(Math.max(i.start - e.duration, 0)); + let n = 0, i; + e.sn > r.sn ? (n = t - r.start, i = r) : (n = r.start - t, i = e), i.duration !== n && i.setDuration(n); + } else e.sn > r.sn ? r.cc === e.cc && r.minEndPTS ? e.setStart(r.start + (r.minEndPTS - r.start)) : e.setStart(r.start + r.duration) : e.setStart(Math.max(r.start - e.duration, 0)); } -function t2(i, e, t, n, r, s, a) { - n - t <= 0 && (a.warn("Fragment should have a positive duration", e), n = t + e.duration, s = r + e.duration); +function t2(r, e, t, n, i, s, a) { + n - t <= 0 && (a.warn("Fragment should have a positive duration", e), n = t + e.duration, s = i + e.duration); let l = t, u = n; const c = e.startPTS, h = e.endPTS; if (oe(c)) { const b = Math.abs(c - t); - i && b > i.totalduration ? a.warn(`media timestamps and playlist times differ by ${b}s for level ${e.level} ${i.url}`) : oe(e.deltaPTS) ? e.deltaPTS = Math.max(b, e.deltaPTS) : e.deltaPTS = b, l = Math.max(t, c), t = Math.min(t, c), r = e.startDTS !== void 0 ? Math.min(r, e.startDTS) : r, u = Math.min(n, h), n = Math.max(n, h), s = e.endDTS !== void 0 ? Math.max(s, e.endDTS) : s; + r && b > r.totalduration ? a.warn(`media timestamps and playlist times differ by ${b}s for level ${e.level} ${r.url}`) : oe(e.deltaPTS) ? e.deltaPTS = Math.max(b, e.deltaPTS) : e.deltaPTS = b, l = Math.max(t, c), t = Math.min(t, c), i = e.startDTS !== void 0 ? Math.min(i, e.startDTS) : i, u = Math.min(n, h), n = Math.max(n, h), s = e.endDTS !== void 0 ? Math.max(s, e.endDTS) : s; } const d = t - e.start; - e.start !== 0 && e.setStart(t), e.setDuration(n - e.start), e.startPTS = t, e.maxStartPTS = l, e.startDTS = r, e.endPTS = n, e.minEndPTS = u, e.endDTS = s; + e.start !== 0 && e.setStart(t), e.setDuration(n - e.start), e.startPTS = t, e.maxStartPTS = l, e.startDTS = i, e.endPTS = n, e.minEndPTS = u, e.endDTS = s; const f = e.sn; - if (!i || f < i.startSN || f > i.endSN) + if (!r || f < r.startSN || f > r.endSN) return 0; let m; - const g = f - i.startSN, p = i.fragments; + const g = f - r.startSN, p = r.fragments; for (p[g] = e, m = g; m > 0; m--) Pu(p[m], p[m - 1]); for (m = g; m < p.length - 1; m++) Pu(p[m], p[m + 1]); - return i.fragmentHint && Pu(p[p.length - 1], i.fragmentHint), i.PTSKnown = i.alignedSliding = !0, d; + return r.fragmentHint && Pu(p[p.length - 1], r.fragmentHint), r.PTSKnown = r.alignedSliding = !0, d; } -function ZT(i, e, t) { - if (i === e) +function ZT(r, e, t) { + if (r === e) return; let n = null; - const r = i.fragments; - for (let c = r.length - 1; c >= 0; c--) { - const h = r[c].initSegment; + const i = r.fragments; + for (let c = i.length - 1; c >= 0; c--) { + const h = i[c].initSegment; if (h) { n = h; break; } } - i.fragmentHint && delete i.fragmentHint.endPTS; + r.fragmentHint && delete r.fragmentHint.endPTS; let s; - tA(i, e, (c, h, d, f) => { + tA(r, e, (c, h, d, f) => { if ((!e.startCC || e.skippedSegments) && h.cc !== c.cc) { const m = c.cc - h.cc; for (let g = d; g < f.length; g++) @@ -26079,9 +26079,9 @@ function ZT(i, e, t) { a.shift(); e.startSN = a[0].sn; } else { - e.canSkipDateRanges && (e.dateRanges = JT(i.dateRanges, e, t)); - const c = i.fragments.filter((h) => h.rawProgramDateTime); - if (i.hasProgramDateTime && !e.hasProgramDateTime) + e.canSkipDateRanges && (e.dateRanges = JT(r.dateRanges, e, t)); + const c = r.fragments.filter((h) => h.rawProgramDateTime); + if (r.hasProgramDateTime && !e.hasProgramDateTime) for (let h = 1; h < o.length; h++) o[h].programDateTime === null && Uc(o[h], o[h - 1], c); e2(c, e); @@ -26090,26 +26090,26 @@ function ZT(i, e, t) { } if (!e.startCC) { var l; - const c = r2(i, e.startSN - 1); + const c = i2(r, e.startSN - 1); e.startCC = (l = c == null ? void 0 : c.cc) != null ? l : a[0].cc; } - eA(i.partList, e.partList, (c, h) => { + eA(r.partList, e.partList, (c, h) => { h.elementaryStreams = c.elementaryStreams, h.stats = c.stats; - }), s ? t2(e, s, s.startPTS, s.endPTS, s.startDTS, s.endDTS, t) : n2(i, e), a.length && (e.totalduration = e.edge - a[0].start), e.driftStartTime = i.driftStartTime, e.driftStart = i.driftStart; + }), s ? t2(e, s, s.startPTS, s.endPTS, s.startDTS, s.endDTS, t) : n2(r, e), a.length && (e.totalduration = e.edge - a[0].start), e.driftStartTime = r.driftStartTime, e.driftStart = r.driftStart; const u = e.advancedDateTime; if (e.advanced && u) { const c = e.edge; e.driftStart || (e.driftStartTime = u, e.driftStart = c), e.driftEndTime = u, e.driftEnd = c; } else - e.driftEndTime = i.driftEndTime, e.driftEnd = i.driftEnd, e.advancedDateTime = i.advancedDateTime; - e.requestScheduled === -1 && (e.requestScheduled = i.requestScheduled); + e.driftEndTime = r.driftEndTime, e.driftEnd = r.driftEnd, e.advancedDateTime = r.advancedDateTime; + e.requestScheduled === -1 && (e.requestScheduled = r.requestScheduled); } -function JT(i, e, t) { +function JT(r, e, t) { const { dateRanges: n, - recentlyRemovedDateranges: r - } = e, s = Qe({}, i); - r && r.forEach((l) => { + recentlyRemovedDateranges: i + } = e, s = Qe({}, r); + i && i.forEach((l) => { delete s[l]; }); const o = Object.keys(s).length; @@ -26118,68 +26118,68 @@ function JT(i, e, t) { c.isValid ? (s[l] = c, u || (c.tagOrder += o)) : t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${et(n[l].attr)}"`); }), s) : n; } -function eA(i, e, t) { - if (i && e) { +function eA(r, e, t) { + if (r && e) { let n = 0; - for (let r = 0, s = i.length; r <= s; r++) { - const a = i[r], o = e[r + n]; + for (let i = 0, s = r.length; i <= s; i++) { + const a = r[i], o = e[i + n]; a && o && a.index === o.index && a.fragment.sn === o.fragment.sn ? t(a, o) : n--; } } } -function tA(i, e, t) { - const n = e.skippedSegments, r = Math.max(i.startSN, e.startSN) - e.startSN, s = (i.fragmentHint ? 1 : 0) + (n ? e.endSN : Math.min(i.endSN, e.endSN)) - e.startSN, a = e.startSN - i.startSN, o = e.fragmentHint ? e.fragments.concat(e.fragmentHint) : e.fragments, l = i.fragmentHint ? i.fragments.concat(i.fragmentHint) : i.fragments; - for (let u = r; u <= s; u++) { +function tA(r, e, t) { + const n = e.skippedSegments, i = Math.max(r.startSN, e.startSN) - e.startSN, s = (r.fragmentHint ? 1 : 0) + (n ? e.endSN : Math.min(r.endSN, e.endSN)) - e.startSN, a = e.startSN - r.startSN, o = e.fragmentHint ? e.fragments.concat(e.fragmentHint) : e.fragments, l = r.fragmentHint ? r.fragments.concat(r.fragmentHint) : r.fragments; + for (let u = i; u <= s; u++) { const c = l[a + u]; let h = o[u]; if (n && !h && c && (h = e.fragments[u] = c), c && h) { t(c, h, u, o); const d = c.relurl, f = h.relurl; if (d && nA(d, f)) { - e.playlistParsingError = p1(`media sequence mismatch ${h.sn}:`, i, e, c, h); + e.playlistParsingError = p1(`media sequence mismatch ${h.sn}:`, r, e, c, h); return; } else if (c.cc !== h.cc) { - e.playlistParsingError = p1(`discontinuity sequence mismatch (${c.cc}!=${h.cc})`, i, e, c, h); + e.playlistParsingError = p1(`discontinuity sequence mismatch (${c.cc}!=${h.cc})`, r, e, c, h); return; } } } } -function p1(i, e, t, n, r) { - return new Error(`${i} ${r.url} +function p1(r, e, t, n, i) { + return new Error(`${r} ${i.url} Playlist starting @${e.startSN} ${e.m3u8} Playlist starting @${t.startSN} ${t.m3u8}`); } -function n2(i, e, t = !0) { - const n = e.startSN + e.skippedSegments - i.startSN, r = i.fragments, s = n >= 0; +function n2(r, e, t = !0) { + const n = e.startSN + e.skippedSegments - r.startSN, i = r.fragments, s = n >= 0; let a = 0; - if (s && n < r.length) - a = r[n].start; - else if (s && e.startSN === i.endSN + 1) - a = i.fragmentEnd; + if (s && n < i.length) + a = i[n].start; + else if (s && e.startSN === r.endSN + 1) + a = r.fragmentEnd; else if (s && t) - a = i.fragmentStart + n * e.levelTargetDuration; + a = r.fragmentStart + n * e.levelTargetDuration; else if (!e.skippedSegments && e.fragmentStart === 0) - a = i.fragmentStart; + a = r.fragmentStart; else return; Hc(e, a); } -function Hc(i, e) { +function Hc(r, e) { if (e) { - const t = i.fragments; - for (let n = i.skippedSegments; n < t.length; n++) + const t = r.fragments; + for (let n = r.skippedSegments; n < t.length; n++) t[n].addStart(e); - i.fragmentHint && i.fragmentHint.addStart(e); + r.fragmentHint && r.fragmentHint.addStart(e); } } -function i2(i, e = 1 / 0) { - let t = 1e3 * i.targetduration; - if (i.updated) { - const n = i.fragments; +function r2(r, e = 1 / 0) { + let t = 1e3 * r.targetduration; + if (r.updated) { + const n = r.fragments; if (n.length && t * 4 > e) { const s = n[n.length - 1].duration * 1e3; s < t && (t = s); @@ -26188,99 +26188,99 @@ function i2(i, e = 1 / 0) { t /= 2; return Math.round(t); } -function r2(i, e, t) { - if (!i) +function i2(r, e, t) { + if (!r) return null; - let n = i.fragments[e - i.startSN]; - return n || (n = i.fragmentHint, n && n.sn === e) ? n : e < i.startSN && t && t.sn === e ? t : null; + let n = r.fragments[e - r.startSN]; + return n || (n = r.fragmentHint, n && n.sn === e) ? n : e < r.startSN && t && t.sn === e ? t : null; } -function _1(i, e, t) { - return i ? s2(i.partList, e, t) : null; +function _1(r, e, t) { + return r ? s2(r.partList, e, t) : null; } -function s2(i, e, t) { - if (i) - for (let n = i.length; n--; ) { - const r = i[n]; - if (r.index === t && r.fragment.sn === e) - return r; +function s2(r, e, t) { + if (r) + for (let n = r.length; n--; ) { + const i = r[n]; + if (i.index === t && i.fragment.sn === e) + return i; } return null; } -function a2(i) { - i.forEach((e, t) => { +function a2(r) { + r.forEach((e, t) => { var n; - (n = e.details) == null || n.fragments.forEach((r) => { - r.level = t, r.initSegment && (r.initSegment.level = t); + (n = e.details) == null || n.fragments.forEach((i) => { + i.level = t, i.initSegment && (i.initSegment.level = t); }); }); } -function nA(i, e) { - return i !== e && e ? v1(i) !== v1(e) : !1; +function nA(r, e) { + return r !== e && e ? v1(r) !== v1(e) : !1; } -function v1(i) { - return i.replace(/\?[^?]*$/, ""); +function v1(r) { + return r.replace(/\?[^?]*$/, ""); } -function La(i, e) { - for (let n = 0, r = i.length; n < r; n++) { +function La(r, e) { + for (let n = 0, i = r.length; n < i; n++) { var t; - if (((t = i[n]) == null ? void 0 : t.cc) === e) - return i[n]; + if (((t = r[n]) == null ? void 0 : t.cc) === e) + return r[n]; } return null; } -function iA(i, e) { - return !!(i && e.startCC < i.endCC && e.endCC > i.startCC); +function rA(r, e) { + return !!(r && e.startCC < r.endCC && e.endCC > r.startCC); } -function y1(i, e) { - const t = i.start + e; - i.startPTS = t, i.setStart(t), i.endPTS = t + i.duration; +function y1(r, e) { + const t = r.start + e; + r.startPTS = t, r.setStart(t), r.endPTS = t + r.duration; } -function o2(i, e) { +function o2(r, e) { const t = e.fragments; - for (let n = 0, r = t.length; n < r; n++) - y1(t[n], i); - e.fragmentHint && y1(e.fragmentHint, i), e.alignedSliding = !0; + for (let n = 0, i = t.length; n < i; n++) + y1(t[n], r); + e.fragmentHint && y1(e.fragmentHint, r), e.alignedSliding = !0; } -function rA(i, e) { - i && (l2(e, i), e.alignedSliding || Kl(e, i), !e.alignedSliding && !e.skippedSegments && n2(i, e, !1)); +function iA(r, e) { + r && (l2(e, r), e.alignedSliding || Kl(e, r), !e.alignedSliding && !e.skippedSegments && n2(r, e, !1)); } -function l2(i, e) { - if (!iA(e, i)) +function l2(r, e) { + if (!rA(e, r)) return; - const t = Math.min(e.endCC, i.endCC), n = La(e.fragments, t), r = La(i.fragments, t); - if (!n || !r) + const t = Math.min(e.endCC, r.endCC), n = La(e.fragments, t), i = La(r.fragments, t); + if (!n || !i) return; We.log(`Aligning playlist at start of dicontinuity sequence ${t}`); - const s = n.start - r.start; - o2(s, i); + const s = n.start - i.start; + o2(s, r); } -function Kl(i, e) { - if (!i.hasProgramDateTime || !e.hasProgramDateTime) +function Kl(r, e) { + if (!r.hasProgramDateTime || !e.hasProgramDateTime) return; - const t = i.fragments, n = e.fragments; + const t = r.fragments, n = e.fragments; if (!t.length || !n.length) return; - let r, s; - const a = Math.min(e.endCC, i.endCC); - e.startCC < a && i.startCC < a && (r = La(n, a), s = La(t, a)), (!r || !s) && (r = n[Math.floor(n.length / 2)], s = La(t, r.cc) || t[Math.floor(t.length / 2)]); - const o = r.programDateTime, l = s.programDateTime; + let i, s; + const a = Math.min(e.endCC, r.endCC); + e.startCC < a && r.startCC < a && (i = La(n, a), s = La(t, a)), (!i || !s) && (i = n[Math.floor(n.length / 2)], s = La(t, i.cc) || t[Math.floor(t.length / 2)]); + const o = i.programDateTime, l = s.programDateTime; if (!o || !l) return; - const u = (l - o) / 1e3 - (s.start - r.start); - o2(u, i); + const u = (l - o) / 1e3 - (s.start - i.start); + o2(u, r); } -function fn(i, e, t) { - An(i, e, t), i.addEventListener(e, t); +function fn(r, e, t) { + An(r, e, t), r.addEventListener(e, t); } -function An(i, e, t) { - i.removeEventListener(e, t); +function An(r, e, t) { + r.removeEventListener(e, t); } const sA = { - toString: function(i) { + toString: function(r) { let e = ""; - const t = i.length; + const t = r.length; for (let n = 0; n < t; n++) - e += `[${i.start(n).toFixed(3)}-${i.end(n).toFixed(3)}]`; + e += `[${r.start(n).toFixed(3)}-${r.end(n).toFixed(3)}]`; return e; } }, Q = { @@ -26298,8 +26298,8 @@ const sA = { WAITING_LEVEL: "WAITING_LEVEL" }; class ed extends jv { - constructor(e, t, n, r, s) { - super(r, e.logger), this.hls = void 0, this.fragPrevious = null, this.fragCurrent = null, this.fragmentTracker = void 0, this.transmuxer = null, this._state = Q.STOPPED, this.playlistType = void 0, this.media = null, this.mediaBuffer = null, this.config = void 0, this.bitrateTest = !1, this.lastCurrentTime = 0, this.nextLoadPosition = 0, this.startPosition = 0, this.startTimeOffset = null, this.retryDate = 0, this.levels = null, this.fragmentLoader = void 0, this.keyLoader = void 0, this.levelLastLoaded = null, this.startFragRequested = !1, this.decrypter = void 0, this.initPTS = [], this.buffering = !0, this.loadingParts = !1, this.loopSn = void 0, this.onMediaSeeking = () => { + constructor(e, t, n, i, s) { + super(i, e.logger), this.hls = void 0, this.fragPrevious = null, this.fragCurrent = null, this.fragmentTracker = void 0, this.transmuxer = null, this._state = Q.STOPPED, this.playlistType = void 0, this.media = null, this.mediaBuffer = null, this.config = void 0, this.bitrateTest = !1, this.lastCurrentTime = 0, this.nextLoadPosition = 0, this.startPosition = 0, this.startTimeOffset = null, this.retryDate = 0, this.levels = null, this.fragmentLoader = void 0, this.keyLoader = void 0, this.levelLastLoaded = null, this.startFragRequested = !1, this.decrypter = void 0, this.initPTS = [], this.buffering = !0, this.loadingParts = !1, this.loopSn = void 0, this.onMediaSeeking = () => { const { config: a, fragCurrent: o, @@ -26380,13 +26380,13 @@ class ed extends jv { _streamEnded(e, t) { if (t.live || !this.media) return !1; - const n = e.end || 0, r = this.config.timelineOffset || 0; - if (n <= r) + const n = e.end || 0, i = this.config.timelineOffset || 0; + if (n <= i) return !1; const s = e.buffered; this.config.maxBufferHole && s && s.length > 1 && (e = De.bufferedInfo(s, e.start, 0)); const a = e.nextStart; - if (a && a > r && a < t.edge || this.media.currentTime < e.start) + if (a && a > i && a < t.edge || this.media.currentTime < e.start) return !1; const l = t.partList; if (l != null && l.length) { @@ -26411,13 +26411,13 @@ class ed extends jv { onMediaAttached(e, t) { const n = this.media = this.mediaBuffer = t.media; fn(n, "seeking", this.onMediaSeeking), fn(n, "ended", this.onMediaEnded); - const r = this.config; - this.levels && r.autoStartLoad && this.state === Q.STOPPED && this.startLoad(r.startPosition); + const i = this.config; + this.levels && i.autoStartLoad && this.state === Q.STOPPED && this.startLoad(i.startPosition); } onMediaDetaching(e, t) { - const n = !!t.transferMedia, r = this.media; - if (r !== null) { - if (r.ended && (this.log("MSE detaching and video ended, reset startPosition"), this.startPosition = this.lastCurrentTime = 0), An(r, "seeking", this.onMediaSeeking), An(r, "ended", this.onMediaEnded), this.keyLoader && !n && this.keyLoader.detach(), this.media = this.mediaBuffer = null, this.loopSn = void 0, n) { + const n = !!t.transferMedia, i = this.media; + if (i !== null) { + if (i.ended && (this.log("MSE detaching and video ended, reset startPosition"), this.startPosition = this.lastCurrentTime = 0), An(i, "seeking", this.onMediaSeeking), An(i, "ended", this.onMediaEnded), this.keyLoader && !n && this.keyLoader.detach(), this.media = this.mediaBuffer = null, this.loopSn = void 0, n) { this.resetLoadingState(), this.resetTransmuxer(); return; } @@ -26442,7 +26442,7 @@ class ed extends jv { this.startFragRequested = !0, this._loadFragForPlayback(e, t, n); } _loadFragForPlayback(e, t, n) { - const r = (s) => { + const i = (s) => { const a = s.frag; if (this.fragContextChanged(a)) { this.warn(`${a.type} sn: ${a.sn}${s.part ? " part: " + s.part.index : ""} of ${this.fragInfo(a, !1, s.part)}) was dropped during download.`), this.fragmentTracker.removeFragment(a); @@ -26450,7 +26450,7 @@ class ed extends jv { } a.stats.chunkCount++, this._handleFragmentLoadProgress(s); }; - this._doFragLoad(e, t, n, r).then((s) => { + this._doFragLoad(e, t, n, i).then((s) => { if (!s) return; const a = this.state, o = s.frag; @@ -26497,22 +26497,22 @@ class ed extends jv { flushMainBuffer(e, t, n = null) { if (!(e - t)) return; - const r = { + const i = { startOffset: e, endOffset: t, type: n }; - this.hls.trigger(S.BUFFER_FLUSHING, r); + this.hls.trigger(S.BUFFER_FLUSHING, i); } _loadInitSegment(e, t) { this._doFragLoad(e, t).then((n) => { - const r = n == null ? void 0 : n.frag; - if (!r || this.fragContextChanged(r) || !this.levels) + const i = n == null ? void 0 : n.frag; + if (!i || this.fragContextChanged(i) || !this.levels) throw new Error("init load aborted"); return n; }).then((n) => { const { - hls: r + hls: i } = this, { frag: s, payload: a @@ -26520,7 +26520,7 @@ class ed extends jv { if (a && a.byteLength > 0 && o != null && o.key && o.iv && Us(o.method)) { const l = self.performance.now(); return this.decrypter.decrypt(new Uint8Array(a), o.key.buffer, o.iv.buffer, Zh(o.method)).catch((u) => { - throw r.trigger(S.ERROR, { + throw i.trigger(S.ERROR, { type: fe.MEDIA_ERROR, details: G.FRAG_DECRYPT_ERROR, fatal: !1, @@ -26530,7 +26530,7 @@ class ed extends jv { }), u; }).then((u) => { const c = self.performance.now(); - return r.trigger(S.FRAG_DECRYPTED, { + return i.trigger(S.FRAG_DECRYPTED, { frag: s, payload: u, stats: { @@ -26555,9 +26555,9 @@ class ed extends jv { this.state !== Q.STOPPED && (this.state = Q.IDLE), e.frag.data = new Uint8Array(e.payload), n.parsing.start = n.buffering.start = self.performance.now(), n.parsing.end = n.buffering.end = self.performance.now(), this.tick(); } unhandledEncryptionError(e, t) { - var n, r; + var n, i; const s = e.tracks; - if (s && !t.encrypted && ((n = s.audio) != null && n.encrypted || (r = s.video) != null && r.encrypted) && (!this.config.emeEnabled || !this.keyLoader.emeController)) { + if (s && !t.encrypted && ((n = s.audio) != null && n.encrypted || (i = s.video) != null && i.encrypted) && (!this.config.emeEnabled || !this.keyLoader.emeController)) { const a = this.media, o = new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${a ? "attached mediaKeys: " + a.mediaKeys : "detached"})`); return this.warn(o.message), !a || a.mediaKeys ? !1 : (this.hls.trigger(S.ERROR, { type: fe.KEY_SYSTEM_ERROR, @@ -26578,7 +26578,7 @@ class ed extends jv { fragBufferedComplete(e, t) { const n = this.mediaBuffer ? this.mediaBuffer : this.media; if (this.log(`Buffered ${e.type} sn: ${e.sn}${t ? " part: " + t.index : ""} of ${this.fragInfo(e, !1, t)} > buffer:${n ? sA.toString(De.getBuffered(n)) : "(detached)"})`), Tt(e)) { - var r; + var i; if (e.type !== ce.SUBTITLE) { const a = e.elementaryStreams; if (!Object.keys(a).some((o) => !!a[o])) { @@ -26586,7 +26586,7 @@ class ed extends jv { return; } } - const s = (r = this.levels) == null ? void 0 : r[e.level]; + const s = (i = this.levels) == null ? void 0 : i[e.level]; s != null && s.fragmentError && (this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`), s.fragmentError = 0); } this.state = Q.IDLE; @@ -26599,14 +26599,14 @@ class ed extends jv { return; const { frag: n, - part: r, + part: i, partsLoaded: s - } = e, a = !s || s.length === 0 || s.some((l) => !l), o = new Qh(n.level, n.sn, n.stats.chunkCount + 1, 0, r ? r.index : -1, !a); + } = e, a = !s || s.length === 0 || s.some((l) => !l), o = new Qh(n.level, n.sn, n.stats.chunkCount + 1, 0, i ? i.index : -1, !a); t.flush(o); } _handleFragmentLoadProgress(e) { } - _doFragLoad(e, t, n = null, r) { + _doFragLoad(e, t, n = null, i) { var s; this.fragCurrent = e; const a = t.details; @@ -26629,14 +26629,14 @@ class ed extends jv { } if (n = Math.max(e.start, n || 0), this.loadingParts && Tt(e)) { const d = a.partList; - if (d && r) { + if (d && i) { n > a.fragmentEnd && a.fragmentHint && (e = a.fragmentHint); const f = this.getNextPart(d, e, n); if (f > -1) { const m = d[f]; e = this.fragCurrent = m.fragment, this.log(`Loading ${e.type} sn: ${e.sn} part: ${m.index} (${f}/${d.length - 1}) of ${this.fragInfo(e, !1, m)}) cc: ${e.cc} [${a.startSN}-${a.endSN}], target: ${parseFloat(n.toFixed(3))}`), this.nextLoadPosition = m.start + m.duration, this.state = Q.FRAG_LOADING; let g; - return o ? g = o.then((p) => !p || this.fragContextChanged(p.frag) ? null : this.doFragPartsLoad(e, m, t, r)).catch((p) => this.handleFragLoadError(p)) : g = this.doFragPartsLoad(e, m, t, r).catch((p) => this.handleFragLoadError(p)), this.hls.trigger(S.FRAG_LOADING, { + return o ? g = o.then((p) => !p || this.fragContextChanged(p.frag) ? null : this.doFragPartsLoad(e, m, t, i)).catch((p) => this.handleFragLoadError(p)) : g = this.doFragPartsLoad(e, m, t, i).catch((p) => this.handleFragLoadError(p)), this.hls.trigger(S.FRAG_LOADING, { frag: e, part: m, targetBufferTime: n @@ -26653,16 +26653,16 @@ class ed extends jv { this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e, !1)}) cc: ${e.cc} ${"[" + a.startSN + "-" + a.endSN + "]"}, target: ${parseFloat(n.toFixed(3))}`), oe(e.sn) && !this.bitrateTest && (this.nextLoadPosition = e.start + e.duration), this.state = Q.FRAG_LOADING; const c = this.config.progressive && e.type !== ce.SUBTITLE; let h; - return c && o ? h = o.then((d) => !d || this.fragContextChanged(d.frag) ? null : this.fragmentLoader.load(e, r)).catch((d) => this.handleFragLoadError(d)) : h = Promise.all([this.fragmentLoader.load(e, c ? r : void 0), o]).then(([d]) => (!c && r && r(d), d)).catch((d) => this.handleFragLoadError(d)), this.hls.trigger(S.FRAG_LOADING, { + return c && o ? h = o.then((d) => !d || this.fragContextChanged(d.frag) ? null : this.fragmentLoader.load(e, i)).catch((d) => this.handleFragLoadError(d)) : h = Promise.all([this.fragmentLoader.load(e, c ? i : void 0), o]).then(([d]) => (!c && i && i(d), d)).catch((d) => this.handleFragLoadError(d)), this.hls.trigger(S.FRAG_LOADING, { frag: e, targetBufferTime: n }), this.fragCurrent === null ? Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")) : h; } - doFragPartsLoad(e, t, n, r) { + doFragPartsLoad(e, t, n, i) { return new Promise((s, a) => { var o; const l = [], u = (o = n.details) == null ? void 0 : o.partList, c = (h) => { - this.fragmentLoader.loadPart(e, h, r).then((d) => { + this.fragmentLoader.loadPart(e, h, i).then((d) => { l[h.index] = d; const f = d.part; this.hls.trigger(S.FRAG_LOADED, d); @@ -26702,12 +26702,12 @@ class ed extends jv { } const { frag: n, - part: r, + part: i, level: s } = t, a = self.performance.now(); - n.stats.parsing.end = a, r && (r.stats.parsing.end = a); + n.stats.parsing.end = a, i && (i.stats.parsing.end = a); const o = this.getLevelDetails(), u = o && n.sn > o.endSN || this.shouldLoadParts(o, n.end); - u !== this.loadingParts && (this.log(`LL-Part loading ${u ? "ON" : "OFF"} after parsing segment ending @${n.end.toFixed(2)}`), this.loadingParts = u), this.updateLevelTiming(n, r, s, e.partial); + u !== this.loadingParts && (this.log(`LL-Part loading ${u ? "ON" : "OFF"} after parsing segment ending @${n.end.toFixed(2)}`), this.loadingParts = u), this.updateLevelTiming(n, i, s, e.partial); } shouldLoadParts(e, t) { if (this.config.lowLatencyMode) { @@ -26720,8 +26720,8 @@ class ed extends jv { return !1; const a = s.end + (((n = e.fragmentHint) == null ? void 0 : n.duration) || 0); if (t >= a) { - var r; - if ((this.hls.hasEnoughToStart ? ((r = this.media) == null ? void 0 : r.currentTime) || this.lastCurrentTime : this.getLoadPosition()) > s.start - s.fragment.duration) + var i; + if ((this.hls.hasEnoughToStart ? ((i = this.media) == null ? void 0 : i.currentTime) || this.lastCurrentTime : this.getLoadPosition()) > s.start - s.fragment.duration) return !0; } } @@ -26733,20 +26733,20 @@ class ed extends jv { levels: t, fragCurrent: n } = this, { - level: r, + level: i, sn: s, part: a } = e; - if (!(t != null && t[r])) - return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`), null; - const o = t[r], l = o.details, u = a > -1 ? _1(l, s, a) : null, c = u ? u.fragment : r2(l, s, n); + if (!(t != null && t[i])) + return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${i}. The current chunk will not be buffered.`), null; + const o = t[i], l = o.details, u = a > -1 ? _1(l, s, a) : null, c = u ? u.fragment : i2(l, s, n); return c ? (n && n !== c && (c.stats = n.stats), { frag: c, part: u, level: o }) : null; } - bufferFragmentData(e, t, n, r, s) { + bufferFragmentData(e, t, n, i, s) { if (this.state !== Q.PARSING) return; const { @@ -26760,7 +26760,7 @@ class ed extends jv { type: e.type, frag: t, part: n, - chunkMeta: r, + chunkMeta: i, offset: c, parent: t.type, data: l @@ -26779,23 +26779,23 @@ class ed extends jv { this.flushMainBuffer(0, e.start); return; } - const n = t.currentTime, r = De.bufferInfo(t, n, 0), s = e.duration, a = Math.min(this.config.maxFragLookUpTolerance * 2, s * 0.25), o = Math.max(Math.min(e.start - a, r.end - a), n + a); + const n = t.currentTime, i = De.bufferInfo(t, n, 0), s = e.duration, a = Math.min(this.config.maxFragLookUpTolerance * 2, s * 0.25), o = Math.max(Math.min(e.start - a, i.end - a), n + a); e.start - o > a && this.flushMainBuffer(o, e.start); } getFwdBufferInfo(e, t) { var n; - const r = this.getLoadPosition(); - if (!oe(r)) + const i = this.getLoadPosition(); + if (!oe(i)) return null; - const a = this.lastCurrentTime > r || (n = this.media) != null && n.paused ? 0 : this.config.maxBufferHole; - return this.getFwdBufferInfoAtPos(e, r, t, a); + const a = this.lastCurrentTime > i || (n = this.media) != null && n.paused ? 0 : this.config.maxBufferHole; + return this.getFwdBufferInfoAtPos(e, i, t, a); } - getFwdBufferInfoAtPos(e, t, n, r) { - const s = De.bufferInfo(e, t, r); + getFwdBufferInfoAtPos(e, t, n, i) { + const s = De.bufferInfo(e, t, i); if (s.len === 0 && s.nextStart !== void 0) { const a = this.fragmentTracker.getBufferedFrag(t, n); if (a && (s.nextStart <= a.end || a.gap)) { - const o = Math.max(Math.min(s.nextStart, a.end) - t, r); + const o = Math.max(Math.min(s.nextStart, a.end) - t, i); return De.bufferInfo(e, t, o); } } @@ -26809,16 +26809,16 @@ class ed extends jv { return e ? n = Math.max(8 * t.maxBufferSize / e, t.maxBufferLength) : n = t.maxBufferLength, Math.min(n, t.maxMaxBufferLength); } reduceMaxBufferLength(e, t) { - const n = this.config, r = Math.max(Math.min(e - t, n.maxBufferLength), t), s = Math.max(e - t * 3, n.maxMaxBufferLength / 2, r); - return s >= r ? (n.maxMaxBufferLength = s, this.warn(`Reduce max buffer length to ${s}s`), !0) : !1; + const n = this.config, i = Math.max(Math.min(e - t, n.maxBufferLength), t), s = Math.max(e - t * 3, n.maxMaxBufferLength / 2, i); + return s >= i ? (n.maxMaxBufferLength = s, this.warn(`Reduce max buffer length to ${s}s`), !0) : !1; } getAppendedFrag(e, t = ce.MAIN) { const n = this.fragmentTracker ? this.fragmentTracker.getAppendedFrag(e, t) : null; return n && "fragment" in n ? n.fragment : n; } getNextFragment(e, t) { - const n = t.fragments, r = n.length; - if (!r) + const n = t.fragments, i = n.length; + if (!i) return null; const { config: s @@ -26826,8 +26826,8 @@ class ed extends jv { let l = null; if (t.live) { const h = s.initialLiveManifestSize; - if (r < h) - return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${h})`), null; + if (i < h) + return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${h})`), null; if (!t.PTSKnown && !this.startFragRequested && this.startPosition === -1 || e < a) { var u; o && !this.loadingParts && (this.log("LL-Part loading ON for initial live fragment"), this.loadingParts = !0), l = this.getInitialLiveFragment(t); @@ -26850,13 +26850,13 @@ class ed extends jv { const n = this.fragmentTracker.getState(e); return (n === Ot.OK || n === Ot.PARTIAL && !!e.gap) && this.nextLoadPosition > t; } - getNextFragmentLoopLoading(e, t, n, r, s) { + getNextFragmentLoopLoading(e, t, n, i, s) { let a = null; if (e.gap && (a = this.getNextFragment(this.nextLoadPosition, t), a && !a.gap && n.nextStart)) { - const o = this.getFwdBufferInfoAtPos(this.mediaBuffer ? this.mediaBuffer : this.media, n.nextStart, r, 0); + const o = this.getFwdBufferInfoAtPos(this.mediaBuffer ? this.mediaBuffer : this.media, n.nextStart, i, 0); if (o !== null && n.len + o.len >= s) { const l = a.sn; - return this.loopSn !== l && (this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${l}`), this.loopSn = l), null; + return this.loopSn !== l && (this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${l}`), this.loopSn = l), null; } } return this.loopSn = void 0, a; @@ -26873,13 +26873,13 @@ class ed extends jv { if (!e) return e; if (b1(this.config) && e.type !== ce.SUBTITLE) { - const n = this.hls.interstitialsManager, r = n == null ? void 0 : n.bufferingItem; - if (r) { - const a = r.event; + const n = this.hls.interstitialsManager, i = n == null ? void 0 : n.bufferingItem; + if (i) { + const a = i.event; if (a) { - if (a.appendInPlace || Math.abs(e.start - r.start) > 1 || r.start === 0) + if (a.appendInPlace || Math.abs(e.start - i.start) > 1 || i.start === 0) return null; - } else if (e.end <= r.start && (t == null ? void 0 : t.live) === !1 || e.start > r.end && r.nextEvent && (r.nextEvent.appendInPlace || e.start - r.end > 1)) + } else if (e.end <= i.start && (t == null ? void 0 : t.live) === !1 || e.start > i.end && i.nextEvent && (i.nextEvent.appendInPlace || e.start - i.end > 1)) return null; } const s = n == null ? void 0 : n.playerQueue; @@ -26896,20 +26896,20 @@ class ed extends jv { return e != null && e.initSegment && !e.initSegment.data && !this.bitrateTest ? e.initSegment : e; } getNextPart(e, t, n) { - let r = -1, s = !1, a = !0; + let i = -1, s = !1, a = !0; for (let o = 0, l = e.length; o < l; o++) { const u = e[o]; - if (a = a && !u.independent, r > -1 && n < u.start) + if (a = a && !u.independent, i > -1 && n < u.start) break; const c = u.loaded; - c ? r = -1 : (s || (u.independent || a) && u.fragment === t) && (u.fragment !== t && this.warn(`Need buffer at ${n} but next unloaded part starts at ${u.start}`), r = o), s = c; + c ? i = -1 : (s || (u.independent || a) && u.fragment === t) && (u.fragment !== t && this.warn(`Need buffer at ${n} but next unloaded part starts at ${u.start}`), i = o), s = c; } - return r; + return i; } loadedEndOfParts(e, t) { let n; - for (let r = e.length; r--; ) { - if (n = e[r], !n.loaded) + for (let i = e.length; i--; ) { + if (n = e[i], !n.loaded) return !1; if (t > n.start) return !0; @@ -26923,28 +26923,28 @@ class ed extends jv { */ getInitialLiveFragment(e) { const t = e.fragments, n = this.fragPrevious; - let r = null; + let i = null; if (n) { - if (e.hasProgramDateTime && (this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`), r = ET(t, n.endProgramDateTime, this.config.maxFragLookUpTolerance)), !r) { + if (e.hasProgramDateTime && (this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`), i = ET(t, n.endProgramDateTime, this.config.maxFragLookUpTolerance)), !i) { const s = n.sn + 1; if (s >= e.startSN && s <= e.endSN) { const a = t[s - e.startSN]; - n.cc === a.cc && (r = a, this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`)); + n.cc === a.cc && (i = a, this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`)); } - r || (r = qv(e, n.cc, n.end), r && this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`)); + i || (i = qv(e, n.cc, n.end), i && this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`)); } } else { const s = this.hls.liveSyncPosition; - s !== null && (r = this.getFragmentAtPosition(s, this.bitrateTest ? e.fragmentEnd : e.edge, e)); + s !== null && (i = this.getFragmentAtPosition(s, this.bitrateTest ? e.fragmentEnd : e.edge, e)); } - return r; + return i; } /* This method finds the best matching fragment given the provided position. */ getFragmentAtPosition(e, t, n) { const { - config: r + config: i } = this; let { fragPrevious: s @@ -26956,7 +26956,7 @@ class ed extends jv { fragmentHint: l } = n, { maxFragLookUpTolerance: u - } = r, c = n.partList, h = !!(this.loadingParts && c != null && c.length && l); + } = i, c = n.partList, h = !!(this.loadingParts && c != null && c.length && l); h && !this.bitrateTest && c[c.length - 1].fragment.sn === l.sn && (a = a.concat(l), o = l.sn); let d; if (e < t) { @@ -26975,14 +26975,14 @@ class ed extends jv { return d; } alignPlaylists(e, t, n) { - const r = e.fragments.length; - if (!r) + const i = e.fragments.length; + if (!i) return this.warn("No fragments in live playlist"), 0; const s = e.fragmentStart, a = !t, o = e.alignedSliding && oe(s); if (a || !o && !s) { - rA(n, e); + iA(n, e); const l = e.fragmentStart; - return this.log(`Live playlist sliding: ${l.toFixed(2)} start-sn: ${t ? t.startSN : "na"}->${e.startSN} fragments: ${r}`), l; + return this.log(`Live playlist sliding: ${l.toFixed(2)} start-sn: ${t ? t.startSN : "na"}->${e.startSN} fragments: ${i}`), l; } return s; } @@ -26992,12 +26992,12 @@ class ed extends jv { setStartPosition(e, t) { let n = this.startPosition; n < t && (n = -1); - const r = this.timelineOffset; + const i = this.timelineOffset; if (n === -1) { const s = this.startTimeOffset !== null, a = s ? this.startTimeOffset : e.startTimeOffset; - a !== null && oe(a) ? (n = t + a, a < 0 && (n += e.edge), n = Math.min(Math.max(t, n), t + e.totalduration), this.log(`Setting startPosition to ${n} for start time offset ${a} found in ${s ? "multivariant" : "media"} playlist`), this.startPosition = n) : e.live ? (n = this.hls.liveSyncPosition || t, this.log(`Setting startPosition to -1 to start at live edge ${n}`), this.startPosition = -1) : (this.log("setting startPosition to 0 by default"), this.startPosition = n = 0), this.lastCurrentTime = n + r; + a !== null && oe(a) ? (n = t + a, a < 0 && (n += e.edge), n = Math.min(Math.max(t, n), t + e.totalduration), this.log(`Setting startPosition to ${n} for start time offset ${a} found in ${s ? "multivariant" : "media"} playlist`), this.startPosition = n) : e.live ? (n = this.hls.liveSyncPosition || t, this.log(`Setting startPosition to -1 to start at live edge ${n}`), this.startPosition = -1) : (this.log("setting startPosition to 0 by default"), this.startPosition = n = 0), this.lastCurrentTime = n + i; } - this.nextLoadPosition = n + r; + this.nextLoadPosition = n + i; } getLoadPosition() { var e; @@ -27019,16 +27019,16 @@ class ed extends jv { const b = this.getCurrentContext(t.chunkMeta); b && (t.frag = b.frag); } - const r = t.frag; - if (!r || r.type !== e || !this.levels) + const i = t.frag; + if (!i || i.type !== e || !this.levels) return; - if (this.fragContextChanged(r)) { + if (this.fragContextChanged(i)) { var s; - this.warn(`Frag load error must match current frag to retry ${r.url} > ${(s = this.fragCurrent) == null ? void 0 : s.url}`); + this.warn(`Frag load error must match current frag to retry ${i.url} > ${(s = this.fragCurrent) == null ? void 0 : s.url}`); return; } const a = t.details === G.FRAG_GAP; - a && this.fragmentTracker.fragBuffered(r, !0); + a && this.fragmentTracker.fragBuffered(i, !0); const o = t.errorAction; if (!o) { this.state = Q.ERROR; @@ -27040,8 +27040,8 @@ class ed extends jv { retryCount: c = 0, retryConfig: h } = o, d = !!h, f = d && l === Vt.RetryRequest, m = d && !o.resolved && u === kn.MoveAllAlternatesMatchingHost, g = (n = this.hls.latestLevelDetails) == null ? void 0 : n.live; - if (!f && m && Tt(r) && !r.endList && g && !Kv(t)) - this.resetFragmentErrors(e), this.treatAsGap(r), o.resolved = !0; + if (!f && m && Tt(i) && !i.endList && g && !Kv(t)) + this.resetFragmentErrors(e), this.treatAsGap(i), o.resolved = !0; else if ((f || m) && c < h.maxNumRetry) { var p; const b = Bc((p = t.response) == null ? void 0 : p.code), y = Yh(h, c); @@ -27049,7 +27049,7 @@ class ed extends jv { this.log("Waiting for connection (offline)"), this.retryDate = 1 / 0, t.reason = "offline"; return; } - this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${c + 1}/${h.maxNumRetry} in ${y}ms`); + this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${c + 1}/${h.maxNumRetry} in ${y}ms`); } else if (h) if (this.resetFragmentErrors(e), c < h.maxNumRetry) !a && l !== Vt.RemoveAlternatePermanently && (o.resolved = !0); @@ -27066,8 +27066,8 @@ class ed extends jv { } reduceLengthAndFlushBuffer(e) { if (this.state === Q.PARSING || this.state === Q.PARSED) { - const t = e.frag, n = e.parent, r = this.getFwdBufferInfo(this.mediaBuffer, n), s = r && r.len > 0.5; - s && this.reduceMaxBufferLength(r.len, (t == null ? void 0 : t.duration) || 10); + const t = e.frag, n = e.parent, i = this.getFwdBufferInfo(this.mediaBuffer, n), s = i && i.len > 0.5; + s && this.reduceMaxBufferLength(i.len, (t == null ? void 0 : t.duration) || 10); const a = !s; return a && this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${n} buffer`), t && (this.fragmentTracker.removeFragment(t), this.nextLoadPosition = t.start), this.resetLoadingState(), a; } @@ -27079,8 +27079,8 @@ class ed extends jv { afterBufferFlushed(e, t, n) { if (!e) return; - const r = De.getBuffered(e); - this.fragmentTracker.detectEvictedFragments(t, r, n), this.state === Q.ENDED && this.resetLoadingState(); + const i = De.getBuffered(e); + this.fragmentTracker.detectEvictedFragments(t, i, n), this.state === Q.ENDED && this.resetLoadingState(); } resetLoadingState() { this.log("Reset loading state"), this.fragCurrent = null, this.fragPrevious = null, this.state !== Q.STOPPED && (this.state = Q.IDLE); @@ -27098,7 +27098,7 @@ class ed extends jv { removeUnbufferedFrags(e = 0) { this.fragmentTracker.removeFragmentsInRange(e, 1 / 0, this.playlistType, !1, !0); } - updateLevelTiming(e, t, n, r) { + updateLevelTiming(e, t, n, i) { const s = n.details; if (!s) { this.warn("level.details undefined"); @@ -27110,7 +27110,7 @@ class ed extends jv { const h = c.endPTS - c.startPTS; if (h <= 0) return this.warn(`Could not parse fragment ${e.sn} ${u} duration reliably (${h})`), l || !1; - const d = r ? 0 : t2(s, e, c.startPTS, c.endPTS, c.startDTS, c.endDTS, this); + const d = i ? 0 : t2(s, e, c.startPTS, c.endPTS, c.startDTS, c.endDTS, this); return this.hls.trigger(S.LEVEL_PTS_UPDATED, { details: s, level: n, @@ -27148,8 +27148,8 @@ class ed extends jv { return this.playlistType === ce.MAIN ? "level" : "track"; } fragInfo(e, t = !0, n) { - var r, s; - return `${this.playlistLabel()} ${e.level} (${n ? "part" : "frag"}:[${((r = t && !n ? e.startPTS : (n || e).start) != null ? r : NaN).toFixed(3)}-${((s = t && !n ? e.endPTS : (n || e).end) != null ? s : NaN).toFixed(3)}]${n && e.type === "main" ? "INDEPENDENT=" + (n.independent ? "YES" : "NO") : ""}`; + var i, s; + return `${this.playlistLabel()} ${e.level} (${n ? "part" : "frag"}:[${((i = t && !n ? e.startPTS : (n || e).start) != null ? i : NaN).toFixed(3)}-${((s = t && !n ? e.endPTS : (n || e).end) != null ? s : NaN).toFixed(3)}]${n && e.type === "main" ? "INDEPENDENT=" + (n.independent ? "YES" : "NO") : ""}`; } treatAsGap(e, t) { t && t.fragmentError++, e.gap = !0, this.fragmentTracker.removeFragment(e), this.fragmentTracker.fragBuffered(e, !0); @@ -27169,8 +27169,8 @@ class ed extends jv { return this._state; } } -function b1(i) { - return !!i.interstitialsController && i.enableInterstitialPlayback !== !1; +function b1(r) { + return !!r.interstitialsController && r.enableInterstitialPlayback !== !1; } class u2 { constructor() { @@ -27194,29 +27194,29 @@ class u2 { this.chunks.length = 0, this.dataLength = 0; } } -function aA(i, e) { +function aA(r, e) { const t = new Uint8Array(e); let n = 0; - for (let r = 0; r < i.length; r++) { - const s = i[r]; + for (let i = 0; i < r.length; i++) { + const s = r[i]; t.set(s, n), n += s.length; } return t; } var Mu = { exports: {} }, E1; function oA() { - return E1 || (E1 = 1, function(i) { + return E1 || (E1 = 1, function(r) { var e = Object.prototype.hasOwnProperty, t = "~"; function n() { } Object.create && (n.prototype = /* @__PURE__ */ Object.create(null), new n().__proto__ || (t = !1)); - function r(l, u, c) { + function i(l, u, c) { this.fn = l, this.context = u, this.once = c || !1; } function s(l, u, c, h, d) { if (typeof c != "function") throw new TypeError("The listener must be a function"); - var f = new r(c, h || l, d), m = t ? t + u : u; + var f = new i(c, h || l, d), m = t ? t + u : u; return l._events[m] ? l._events[m].fn ? l._events[m] = [l._events[m], f] : l._events[m].push(f) : (l._events[m] = f, l._eventsCount++), l; } function a(l, u) { @@ -27307,7 +27307,7 @@ function oA() { }, o.prototype.removeAllListeners = function(u) { var c; return u ? (c = t ? t + u : u, this._events[c] && a(this, c)) : (this._events = new n(), this._eventsCount = 0), this; - }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = t, o.EventEmitter = o, i.exports = o; + }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = t, o.EventEmitter = o, r.exports = o; }(Mu)), Mu.exports; } var lA = oA(), td = /* @__PURE__ */ FS(lA); @@ -27316,65 +27316,65 @@ function uA() { return typeof __HLS_WORKER_BUNDLE__ == "function"; } function cA() { - const i = Zs[ja]; - if (i) - return i.clientCount++, i; + const r = Zs[ja]; + if (r) + return r.clientCount++, r; const e = new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`], { type: "text/javascript" - }), t = self.URL.createObjectURL(e), r = { + }), t = self.URL.createObjectURL(e), i = { worker: new self.Worker(t), objectURL: t, clientCount: 1 }; - return Zs[ja] = r, r; + return Zs[ja] = i, i; } -function hA(i) { - const e = Zs[i]; +function hA(r) { + const e = Zs[r]; if (e) return e.clientCount++, e; - const t = new self.URL(i, self.location.href).href, r = { + const t = new self.URL(r, self.location.href).href, i = { worker: new self.Worker(t), scriptURL: t, clientCount: 1 }; - return Zs[i] = r, r; + return Zs[r] = i, i; } -function dA(i) { - const e = Zs[i || ja]; +function dA(r) { + const e = Zs[r || ja]; if (e && e.clientCount-- === 1) { const { worker: n, - objectURL: r + objectURL: i } = e; - delete Zs[i || ja], r && self.URL.revokeObjectURL(r), n.terminate(); + delete Zs[r || ja], i && self.URL.revokeObjectURL(i), n.terminate(); } } -function c2(i, e) { - return e + 10 <= i.length && i[e] === 51 && i[e + 1] === 68 && i[e + 2] === 73 && i[e + 3] < 255 && i[e + 4] < 255 && i[e + 6] < 128 && i[e + 7] < 128 && i[e + 8] < 128 && i[e + 9] < 128; +function c2(r, e) { + return e + 10 <= r.length && r[e] === 51 && r[e + 1] === 68 && r[e + 2] === 73 && r[e + 3] < 255 && r[e + 4] < 255 && r[e + 6] < 128 && r[e + 7] < 128 && r[e + 8] < 128 && r[e + 9] < 128; } -function nd(i, e) { - return e + 10 <= i.length && i[e] === 73 && i[e + 1] === 68 && i[e + 2] === 51 && i[e + 3] < 255 && i[e + 4] < 255 && i[e + 6] < 128 && i[e + 7] < 128 && i[e + 8] < 128 && i[e + 9] < 128; +function nd(r, e) { + return e + 10 <= r.length && r[e] === 73 && r[e + 1] === 68 && r[e + 2] === 51 && r[e + 3] < 255 && r[e + 4] < 255 && r[e + 6] < 128 && r[e + 7] < 128 && r[e + 8] < 128 && r[e + 9] < 128; } -function x0(i, e) { +function x0(r, e) { let t = 0; - return t = (i[e] & 127) << 21, t |= (i[e + 1] & 127) << 14, t |= (i[e + 2] & 127) << 7, t |= i[e + 3] & 127, t; + return t = (r[e] & 127) << 21, t |= (r[e + 1] & 127) << 14, t |= (r[e + 2] & 127) << 7, t |= r[e + 3] & 127, t; } -function Wa(i, e) { +function Wa(r, e) { const t = e; let n = 0; - for (; nd(i, e); ) { + for (; nd(r, e); ) { n += 10; - const r = x0(i, e + 6); - n += r, c2(i, e + 10) && (n += 10), e += n; + const i = x0(r, e + 6); + n += i, c2(r, e + 10) && (n += 10), e += n; } if (n > 0) - return i.subarray(t, t + n); + return r.subarray(t, t + n); } -function fA(i, e, t, n) { - const r = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350], s = e[t + 2], a = s >> 2 & 15; +function fA(r, e, t, n) { + const i = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350], s = e[t + 2], a = s >> 2 & 15; if (a > 12) { const f = new Error(`invalid ADTS sampling index:${a}`); - i.emit(S.ERROR, S.ERROR, { + r.emit(S.ERROR, S.ERROR, { type: fe.MEDIA_ERROR, details: G.FRAG_PARSING_ERROR, fatal: !0, @@ -27383,7 +27383,7 @@ function fA(i, e, t, n) { }); return; } - const o = (s >> 6 & 3) + 1, l = e[t + 3] >> 6 & 3 | (s & 1) << 2, u = "mp4a.40." + o, c = r[a]; + const o = (s >> 6 & 3) + 1, l = e[t + 3] >> 6 & 3 | (s & 1) << 2, u = "mp4a.40." + o, c = i[a]; let h = a; (o === 5 || o === 29) && (h -= 3); const d = [o << 3 | (h & 14) >> 1, (h & 1) << 7 | l << 3]; @@ -27396,52 +27396,52 @@ function fA(i, e, t, n) { manifestCodec: n }; } -function h2(i, e) { - return i[e] === 255 && (i[e + 1] & 246) === 240; +function h2(r, e) { + return r[e] === 255 && (r[e + 1] & 246) === 240; } -function d2(i, e) { - return i[e + 1] & 1 ? 7 : 9; +function d2(r, e) { + return r[e + 1] & 1 ? 7 : 9; } -function id(i, e) { - return (i[e + 3] & 3) << 11 | i[e + 4] << 3 | (i[e + 5] & 224) >>> 5; +function rd(r, e) { + return (r[e + 3] & 3) << 11 | r[e + 4] << 3 | (r[e + 5] & 224) >>> 5; } -function mA(i, e) { - return e + 5 < i.length; +function mA(r, e) { + return e + 5 < r.length; } -function jl(i, e) { - return e + 1 < i.length && h2(i, e); +function jl(r, e) { + return e + 1 < r.length && h2(r, e); } -function gA(i, e) { - return mA(i, e) && h2(i, e) && id(i, e) <= i.length - e; +function gA(r, e) { + return mA(r, e) && h2(r, e) && rd(r, e) <= r.length - e; } -function pA(i, e) { - if (jl(i, e)) { - const t = d2(i, e); - if (e + t >= i.length) +function pA(r, e) { + if (jl(r, e)) { + const t = d2(r, e); + if (e + t >= r.length) return !1; - const n = id(i, e); + const n = rd(r, e); if (n <= t) return !1; - const r = e + n; - return r === i.length || jl(i, r); + const i = e + n; + return i === r.length || jl(r, i); } return !1; } -function f2(i, e, t, n, r) { - if (!i.samplerate) { - const s = fA(e, t, n, r); +function f2(r, e, t, n, i) { + if (!r.samplerate) { + const s = fA(e, t, n, i); if (!s) return; - Qe(i, s); + Qe(r, s); } } -function m2(i) { - return 1024 * 9e4 / i; +function m2(r) { + return 1024 * 9e4 / r; } -function _A(i, e) { - const t = d2(i, e); - if (e + t <= i.length) { - const n = id(i, e) - t; +function _A(r, e) { + const t = d2(r, e); + if (e + t <= r.length) { + const n = rd(r, e) - t; if (n > 0) return { headerLength: t, @@ -27449,8 +27449,8 @@ function _A(i, e) { }; } } -function g2(i, e, t, n, r) { - const s = m2(i.samplerate), a = n + r * s, o = _A(e, t); +function g2(r, e, t, n, i) { + const s = m2(r.samplerate), a = n + i * s, o = _A(e, t); let l; if (o) { const { @@ -27462,7 +27462,7 @@ function g2(i, e, t, n, r) { unit: l, pts: a }; - return m || i.samples.push(g), { + return m || r.samples.push(g), { sample: g, length: f, missing: m @@ -27478,155 +27478,155 @@ function g2(i, e, t, n, r) { missing: -1 }; } -function vA(i, e) { - return nd(i, e) && x0(i, e + 6) + 10 <= i.length - e; +function vA(r, e) { + return nd(r, e) && x0(r, e + 6) + 10 <= r.length - e; } -function yA(i) { - return i instanceof ArrayBuffer ? i : i.byteOffset == 0 && i.byteLength == i.buffer.byteLength ? i.buffer : new Uint8Array(i).buffer; +function yA(r) { + return r instanceof ArrayBuffer ? r : r.byteOffset == 0 && r.byteLength == r.buffer.byteLength ? r.buffer : new Uint8Array(r).buffer; } -function Ou(i, e = 0, t = 1 / 0) { - return bA(i, e, t, Uint8Array); +function Ou(r, e = 0, t = 1 / 0) { + return bA(r, e, t, Uint8Array); } -function bA(i, e, t, n) { - const r = EA(i); +function bA(r, e, t, n) { + const i = EA(r); let s = 1; "BYTES_PER_ELEMENT" in n && (s = n.BYTES_PER_ELEMENT); - const a = SA(i) ? i.byteOffset : 0, o = (a + i.byteLength) / s, l = (a + e) / s, u = Math.floor(Math.max(0, Math.min(l, o))), c = Math.floor(Math.min(u + Math.max(t, 0), o)); - return new n(r, u, c - u); + const a = SA(r) ? r.byteOffset : 0, o = (a + r.byteLength) / s, l = (a + e) / s, u = Math.floor(Math.max(0, Math.min(l, o))), c = Math.floor(Math.min(u + Math.max(t, 0), o)); + return new n(i, u, c - u); } -function EA(i) { - return i instanceof ArrayBuffer ? i : i.buffer; +function EA(r) { + return r instanceof ArrayBuffer ? r : r.buffer; } -function SA(i) { - return i && i.buffer instanceof ArrayBuffer && i.byteLength !== void 0 && i.byteOffset !== void 0; +function SA(r) { + return r && r.buffer instanceof ArrayBuffer && r.byteLength !== void 0 && r.byteOffset !== void 0; } -function TA(i) { +function TA(r) { const e = { - key: i.type, + key: r.type, description: "", data: "", mimeType: null, pictureType: null }, t = 3; - if (i.size < 2) + if (r.size < 2) return; - if (i.data[0] !== t) { + if (r.data[0] !== t) { console.log("Ignore frame with unrecognized character encoding"); return; } - const n = i.data.subarray(1).indexOf(0); + const n = r.data.subarray(1).indexOf(0); if (n === -1) return; - const r = On(Ou(i.data, 1, n)), s = i.data[2 + n], a = i.data.subarray(3 + n).indexOf(0); + const i = On(Ou(r.data, 1, n)), s = r.data[2 + n], a = r.data.subarray(3 + n).indexOf(0); if (a === -1) return; - const o = On(Ou(i.data, 3 + n, a)); + const o = On(Ou(r.data, 3 + n, a)); let l; - return r === "-->" ? l = On(Ou(i.data, 4 + n + a)) : l = yA(i.data.subarray(4 + n + a)), e.mimeType = r, e.pictureType = s, e.description = o, e.data = l, e; + return i === "-->" ? l = On(Ou(r.data, 4 + n + a)) : l = yA(r.data.subarray(4 + n + a)), e.mimeType = i, e.pictureType = s, e.description = o, e.data = l, e; } -function AA(i) { - if (i.size < 2) +function AA(r) { + if (r.size < 2) return; - const e = On(i.data, !0), t = new Uint8Array(i.data.subarray(e.length + 1)); + const e = On(r.data, !0), t = new Uint8Array(r.data.subarray(e.length + 1)); return { - key: i.type, + key: r.type, info: e, data: t.buffer }; } -function xA(i) { - if (i.size < 2) +function xA(r) { + if (r.size < 2) return; - if (i.type === "TXXX") { + if (r.type === "TXXX") { let t = 1; - const n = On(i.data.subarray(t), !0); + const n = On(r.data.subarray(t), !0); t += n.length + 1; - const r = On(i.data.subarray(t)); + const i = On(r.data.subarray(t)); return { - key: i.type, + key: r.type, info: n, - data: r + data: i }; } - const e = On(i.data.subarray(1)); + const e = On(r.data.subarray(1)); return { - key: i.type, + key: r.type, info: "", data: e }; } -function wA(i) { - if (i.type === "WXXX") { - if (i.size < 2) +function wA(r) { + if (r.type === "WXXX") { + if (r.size < 2) return; let t = 1; - const n = On(i.data.subarray(t), !0); + const n = On(r.data.subarray(t), !0); t += n.length + 1; - const r = On(i.data.subarray(t)); + const i = On(r.data.subarray(t)); return { - key: i.type, + key: r.type, info: n, - data: r + data: i }; } - const e = On(i.data); + const e = On(r.data); return { - key: i.type, + key: r.type, info: "", data: e }; } -function DA(i) { - return i.type === "PRIV" ? AA(i) : i.type[0] === "W" ? wA(i) : i.type === "APIC" ? TA(i) : xA(i); +function DA(r) { + return r.type === "PRIV" ? AA(r) : r.type[0] === "W" ? wA(r) : r.type === "APIC" ? TA(r) : xA(r); } -function kA(i) { - const e = String.fromCharCode(i[0], i[1], i[2], i[3]), t = x0(i, 4), n = 10; +function kA(r) { + const e = String.fromCharCode(r[0], r[1], r[2], r[3]), t = x0(r, 4), n = 10; return { type: e, size: t, - data: i.subarray(n, n + t) + data: r.subarray(n, n + t) }; } const Uo = 10, IA = 10; -function p2(i) { +function p2(r) { let e = 0; const t = []; - for (; nd(i, e); ) { - const n = x0(i, e + 6); - i[e + 5] >> 6 & 1 && (e += Uo), e += Uo; - const r = e + n; - for (; e + IA < r; ) { - const s = kA(i.subarray(e)), a = DA(s); + for (; nd(r, e); ) { + const n = x0(r, e + 6); + r[e + 5] >> 6 & 1 && (e += Uo), e += Uo; + const i = e + n; + for (; e + IA < i; ) { + const s = kA(r.subarray(e)), a = DA(s); a && t.push(a), e += s.size + Uo; } - c2(i, e) && (e += Uo); + c2(r, e) && (e += Uo); } return t; } -function _2(i) { - return i && i.key === "PRIV" && i.info === "com.apple.streaming.transportStreamTimestamp"; +function _2(r) { + return r && r.key === "PRIV" && r.info === "com.apple.streaming.transportStreamTimestamp"; } -function LA(i) { - if (i.data.byteLength === 8) { - const e = new Uint8Array(i.data), t = e[3] & 1; +function LA(r) { + if (r.data.byteLength === 8) { + const e = new Uint8Array(r.data), t = e[3] & 1; let n = (e[4] << 23) + (e[5] << 15) + (e[6] << 7) + e[7]; return n /= 45, t && (n += 4772185884e-2), Math.round(n); } } -function rd(i) { - const e = p2(i); +function id(r) { + const e = p2(r); for (let t = 0; t < e.length; t++) { const n = e[t]; if (_2(n)) return LA(n); } } -let Rn = /* @__PURE__ */ function(i) { - return i.audioId3 = "org.id3", i.dateRange = "com.apple.quicktime.HLS", i.emsg = "https://aomedia.org/emsg/ID3", i.misbklv = "urn:misb:KLV:bin:1910.1", i; +let Rn = /* @__PURE__ */ function(r) { + return r.audioId3 = "org.id3", r.dateRange = "com.apple.quicktime.HLS", r.emsg = "https://aomedia.org/emsg/ID3", r.misbklv = "urn:misb:KLV:bin:1910.1", r; }({}); -function ki(i = "", e = 9e4) { +function kr(r = "", e = 9e4) { return { - type: i, + type: r, id: -1, pid: -1, inputTimeScale: e, @@ -27639,7 +27639,7 @@ class sd { constructor() { this._audioTrack = void 0, this._id3Track = void 0, this.frameIndex = 0, this.cachedData = null, this.basePTS = null, this.initPTS = null, this.lastPTS = null; } - resetInitSegment(e, t, n, r) { + resetInitSegment(e, t, n, i) { this._id3Track = { type: "id3", id: 3, @@ -27664,35 +27664,35 @@ class sd { // feed incoming data to the front of the parsing pipeline demux(e, t) { this.cachedData && (e = Zn(this.cachedData, e), this.cachedData = null); - let n = Wa(e, 0), r = n ? n.length : 0, s; - const a = this._audioTrack, o = this._id3Track, l = n ? rd(n) : void 0, u = e.length; + let n = Wa(e, 0), i = n ? n.length : 0, s; + const a = this._audioTrack, o = this._id3Track, l = n ? id(n) : void 0, u = e.length; for ((this.basePTS === null || this.frameIndex === 0 && oe(l)) && (this.basePTS = RA(l, t, this.initPTS), this.lastPTS = this.basePTS), this.lastPTS === null && (this.lastPTS = this.basePTS), n && n.length > 0 && o.samples.push({ pts: this.lastPTS, dts: this.lastPTS, data: n, type: Rn.audioId3, duration: Number.POSITIVE_INFINITY - }); r < u; ) { - if (this.canParse(e, r)) { - const c = this.appendFrame(a, e, r); - c ? (this.frameIndex++, this.lastPTS = c.sample.pts, r += c.length, s = r) : r = u; - } else vA(e, r) ? (n = Wa(e, r), o.samples.push({ + }); i < u; ) { + if (this.canParse(e, i)) { + const c = this.appendFrame(a, e, i); + c ? (this.frameIndex++, this.lastPTS = c.sample.pts, i += c.length, s = i) : i = u; + } else vA(e, i) ? (n = Wa(e, i), o.samples.push({ pts: this.lastPTS, dts: this.lastPTS, data: n, type: Rn.audioId3, duration: Number.POSITIVE_INFINITY - }), r += n.length, s = r) : r++; - if (r === u && s !== u) { + }), i += n.length, s = i) : i++; + if (i === u && s !== u) { const c = e.slice(s); this.cachedData ? this.cachedData = Zn(this.cachedData, c) : this.cachedData = c; } } return { audioTrack: a, - videoTrack: ki(), + videoTrack: kr(), id3Track: o, - textTrack: ki() + textTrack: kr() }; } demuxSampleAes(e, t, n) { @@ -27702,18 +27702,18 @@ class sd { const t = this.cachedData; return t && (this.cachedData = null, this.demux(t, 0)), { audioTrack: this._audioTrack, - videoTrack: ki(), + videoTrack: kr(), id3Track: this._id3Track, - textTrack: ki() + textTrack: kr() }; } destroy() { this.cachedData = null, this._audioTrack = this._id3Track = void 0; } } -const RA = (i, e, t) => { - if (oe(i)) - return i * 90; +const RA = (r, e, t) => { + if (oe(r)) + return r * 90; const n = t ? t.baseTime * 9e4 / t.timescale : 0; return e * 9e4 + n; }; @@ -27773,32 +27773,32 @@ const CA = [32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 3 4 // Layer1 ]; -function v2(i, e, t, n, r) { +function v2(r, e, t, n, i) { if (t + 24 > e.length) return; const s = y2(e, t); if (s && t + s.frameLength <= e.length) { - const a = s.samplesPerFrame * 9e4 / s.sampleRate, o = n + r * a, l = { + const a = s.samplesPerFrame * 9e4 / s.sampleRate, o = n + i * a, l = { unit: e.subarray(t, t + s.frameLength), pts: o, dts: o }; - return i.config = [], i.channelCount = s.channelCount, i.samplerate = s.sampleRate, i.samples.push(l), { + return r.config = [], r.channelCount = s.channelCount, r.samplerate = s.sampleRate, r.samples.push(l), { sample: l, length: s.frameLength, missing: 0 }; } } -function y2(i, e) { - const t = i[e + 1] >> 3 & 3, n = i[e + 1] >> 1 & 3, r = i[e + 2] >> 4 & 15, s = i[e + 2] >> 2 & 3; - if (t !== 1 && r !== 0 && r !== 15 && s !== 3) { - const a = i[e + 2] >> 1 & 1, o = i[e + 3] >> 6, l = t === 3 ? 3 - n : n === 3 ? 3 : 4, u = CA[l * 14 + r - 1] * 1e3, h = FA[(t === 3 ? 0 : t === 2 ? 1 : 2) * 3 + s], d = o === 3 ? 1 : 2, f = PA[t][n], m = MA[n], g = f * 8 * m, p = Math.floor(f * u / h + a) * m; +function y2(r, e) { + const t = r[e + 1] >> 3 & 3, n = r[e + 1] >> 1 & 3, i = r[e + 2] >> 4 & 15, s = r[e + 2] >> 2 & 3; + if (t !== 1 && i !== 0 && i !== 15 && s !== 3) { + const a = r[e + 2] >> 1 & 1, o = r[e + 3] >> 6, l = t === 3 ? 3 - n : n === 3 ? 3 : 4, u = CA[l * 14 + i - 1] * 1e3, h = FA[(t === 3 ? 0 : t === 2 ? 1 : 2) * 3 + s], d = o === 3 ? 1 : 2, f = PA[t][n], m = MA[n], g = f * 8 * m, p = Math.floor(f * u / h + a) * m; if (Ho === null) { const v = (navigator.userAgent || "").match(/Chrome\/(\d+)/i); Ho = v ? parseInt(v[1]) : 0; } - return !!Ho && Ho <= 87 && n === 2 && u >= 224e3 && o === 0 && (i[e + 3] = i[e + 3] | 128), { + return !!Ho && Ho <= 87 && n === 2 && u >= 224e3 && o === 0 && (r[e + 3] = r[e + 3] | 128), { sampleRate: h, channelCount: d, frameLength: p, @@ -27806,22 +27806,22 @@ function y2(i, e) { }; } } -function ad(i, e) { - return i[e] === 255 && (i[e + 1] & 224) === 224 && (i[e + 1] & 6) !== 0; +function ad(r, e) { + return r[e] === 255 && (r[e + 1] & 224) === 224 && (r[e + 1] & 6) !== 0; } -function b2(i, e) { - return e + 1 < i.length && ad(i, e); +function b2(r, e) { + return e + 1 < r.length && ad(r, e); } -function OA(i, e) { - return ad(i, e) && 4 <= i.length - e; +function OA(r, e) { + return ad(r, e) && 4 <= r.length - e; } -function E2(i, e) { - if (e + 1 < i.length && ad(i, e)) { - const n = y2(i, e); - let r = 4; - n != null && n.frameLength && (r = n.frameLength); - const s = e + r; - return s === i.length || b2(i, s); +function E2(r, e) { + if (e + 1 < r.length && ad(r, e)) { + const n = y2(r, e); + let i = 4; + n != null && n.frameLength && (i = n.frameLength); + const s = e + i; + return s === r.length || b2(r, s); } return !1; } @@ -27829,8 +27829,8 @@ class BA extends sd { constructor(e, t) { super(), this.observer = void 0, this.config = void 0, this.observer = e, this.config = t; } - resetInitSegment(e, t, n, r) { - super.resetInitSegment(e, t, n, r), this._audioTrack = { + resetInitSegment(e, t, n, i) { + super.resetInitSegment(e, t, n, i), this._audioTrack = { container: "audio/adts", type: "audio", id: 2, @@ -27839,7 +27839,7 @@ class BA extends sd { segmentCodec: "aac", samples: [], manifestCodec: t, - duration: r, + duration: i, inputTimeScale: 9e4, dropped: 0 }; @@ -27849,11 +27849,11 @@ class BA extends sd { if (!e) return !1; const n = Wa(e, 0); - let r = (n == null ? void 0 : n.length) || 0; - if (E2(e, r)) + let i = (n == null ? void 0 : n.length) || 0; + if (E2(e, i)) return !1; - for (let s = e.length; r < s; r++) - if (pA(e, r)) + for (let s = e.length; i < s; i++) + if (pA(e, i)) return t.log("ADTS sync word found !"), !0; return !1; } @@ -27862,19 +27862,19 @@ class BA extends sd { } appendFrame(e, t, n) { f2(e, this.observer, t, n, e.manifestCodec); - const r = g2(e, t, n, this.basePTS, this.frameIndex); - if (r && r.missing === 0) - return r; + const i = g2(e, t, n, this.basePTS, this.frameIndex); + if (i && i.missing === 0) + return i; } } -const S2 = (i, e) => { +const S2 = (r, e) => { let t = 0, n = 5; e += n; - const r = new Uint32Array(1), s = new Uint32Array(1), a = new Uint8Array(1); + const i = new Uint32Array(1), s = new Uint32Array(1), a = new Uint8Array(1); for (; n > 0; ) { - a[0] = i[e]; + a[0] = r[e]; const o = Math.min(n, 8), l = 8 - o; - s[0] = 4278190080 >>> 24 + l << l, r[0] = (a[0] & s[0]) >> l, t = t ? t << o | r[0] : r[0], e += 1, n -= o; + s[0] = 4278190080 >>> 24 + l << l, i[0] = (a[0] & s[0]) >> l, t = t ? t << o | i[0] : i[0], e += 1, n -= o; } return t; }; @@ -27882,8 +27882,8 @@ class NA extends sd { constructor(e) { super(), this.observer = void 0, this.observer = e; } - resetInitSegment(e, t, n, r) { - super.resetInitSegment(e, t, n, r), this._audioTrack = { + resetInitSegment(e, t, n, i) { + super.resetInitSegment(e, t, n, i), this._audioTrack = { container: "audio/ac-3", type: "audio", id: 2, @@ -27892,7 +27892,7 @@ class NA extends sd { segmentCodec: "ac3", samples: [], manifestCodec: t, - duration: r, + duration: i, inputTimeScale: 9e4, dropped: 0 }; @@ -27901,11 +27901,11 @@ class NA extends sd { return t + 64 < e.length; } appendFrame(e, t, n) { - const r = T2(e, t, n, this.basePTS, this.frameIndex); - if (r !== -1) + const i = T2(e, t, n, this.basePTS, this.frameIndex); + if (i !== -1) return { sample: e.samples[e.samples.length - 1], - length: r, + length: i, missing: 0 }; } @@ -27916,11 +27916,11 @@ class NA extends sd { if (!t) return !1; const n = t.length; - return e[n] === 11 && e[n + 1] === 119 && rd(t) !== void 0 && // check the bsid to confirm ac-3 + return e[n] === 11 && e[n + 1] === 119 && id(t) !== void 0 && // check the bsid to confirm ac-3 S2(e, n) < 16; } } -function T2(i, e, t, n, r) { +function T2(r, e, t, n, i) { if (t + 8 > e.length || e[t] !== 11 || e[t + 1] !== 119) return -1; const s = e[t + 4] >> 6; @@ -27932,15 +27932,15 @@ function T2(i, e, t, n, r) { const h = e[t + 6] >> 5; let d = 0; h === 2 ? d += 2 : (h & 1 && h !== 1 && (d += 2), h & 4 && (d += 2)); - const f = (e[t + 6] << 8 | e[t + 7]) >> 12 - d & 1, g = [2, 1, 2, 3, 3, 4, 4, 5][h] + f, p = e[t + 5] >> 3, b = e[t + 5] & 7, y = new Uint8Array([s << 6 | p << 1 | b >> 2, (b & 3) << 6 | h << 3 | f << 2 | l >> 4, l << 4 & 224]), v = 1536 / o * 9e4, T = n + r * v, A = e.subarray(t, t + c); - return i.config = y, i.channelCount = g, i.samplerate = o, i.samples.push({ + const f = (e[t + 6] << 8 | e[t + 7]) >> 12 - d & 1, g = [2, 1, 2, 3, 3, 4, 4, 5][h] + f, p = e[t + 5] >> 3, b = e[t + 5] & 7, y = new Uint8Array([s << 6 | p << 1 | b >> 2, (b & 3) << 6 | h << 3 | f << 2 | l >> 4, l << 4 & 224]), v = 1536 / o * 9e4, T = n + i * v, A = e.subarray(t, t + c); + return r.config = y, r.channelCount = g, r.samplerate = o, r.samples.push({ unit: A, pts: T }), c; } class $A extends sd { - resetInitSegment(e, t, n, r) { - super.resetInitSegment(e, t, n, r), this._audioTrack = { + resetInitSegment(e, t, n, i) { + super.resetInitSegment(e, t, n, i), this._audioTrack = { container: "audio/mpeg", type: "audio", id: 2, @@ -27949,7 +27949,7 @@ class $A extends sd { segmentCodec: "mp3", samples: [], manifestCodec: t, - duration: r, + duration: i, inputTimeScale: 9e4, dropped: 0 }; @@ -27959,10 +27959,10 @@ class $A extends sd { return !1; const t = Wa(e, 0); let n = (t == null ? void 0 : t.length) || 0; - if (t && e[n] === 11 && e[n + 1] === 119 && rd(t) !== void 0 && // check the bsid to confirm ac-3 or ec-3 (not mp3) + if (t && e[n] === 11 && e[n + 1] === 119 && id(t) !== void 0 && // check the bsid to confirm ac-3 or ec-3 (not mp3) S2(e, n) <= 16) return !1; - for (let r = e.length; n < r; n++) + for (let i = e.length; n < i; n++) if (E2(e, n)) return We.log("MPEG Audio sync word found !"), !0; return !1; @@ -27982,9 +27982,9 @@ class HA { } resetTimeStamp() { } - resetInitSegment(e, t, n, r) { - const s = this.videoTrack = ki("video", 1), a = this.audioTrack = ki("audio", 1), o = this.txtTrack = ki("text", 1); - if (this.id3Track = ki("id3", 1), this.timeOffset = 0, !(e != null && e.byteLength)) + resetInitSegment(e, t, n, i) { + const s = this.videoTrack = kr("video", 1), a = this.audioTrack = kr("audio", 1), o = this.txtTrack = kr("text", 1); + if (this.id3Track = kr("id3", 1), this.timeOffset = 0, !(e != null && e.byteLength)) return; const l = Fv(e); if (l.video) { @@ -28004,7 +28004,7 @@ class HA { } = l.audio; a.id = u, a.timescale = c, a.codec = h; } - o.id = Lv.text, s.sampleDuration = 0, s.duration = a.duration = r; + o.id = Lv.text, s.sampleDuration = 0, s.duration = a.duration = i; } resetContiguity() { this.remainderData = null; @@ -28015,16 +28015,16 @@ class HA { demux(e, t) { this.timeOffset = t; let n = e; - const r = this.videoTrack, s = this.txtTrack; + const i = this.videoTrack, s = this.txtTrack; if (this.config.progressive) { this.remainderData && (n = Zn(this.remainderData, e)); const o = VS(n); - this.remainderData = o.remainder, r.samples = o.valid || new Uint8Array(); + this.remainderData = o.remainder, i.samples = o.valid || new Uint8Array(); } else - r.samples = n; - const a = this.extractID3Track(r, t); - return s.samples = $m(t, r), { - videoTrack: r, + i.samples = n; + const a = this.extractID3Track(i, t); + return s.samples = $m(t, i), { + videoTrack: i, audioTrack: this.audioTrack, id3Track: a, textTrack: this.txtTrack @@ -28033,19 +28033,19 @@ class HA { flush() { const e = this.timeOffset, t = this.videoTrack, n = this.txtTrack; t.samples = this.remainderData || new Uint8Array(), this.remainderData = null; - const r = this.extractID3Track(t, this.timeOffset); + const i = this.extractID3Track(t, this.timeOffset); return n.samples = $m(e, t), { videoTrack: t, - audioTrack: ki(), - id3Track: r, - textTrack: ki() + audioTrack: kr(), + id3Track: i, + textTrack: kr() }; } extractID3Track(e, t) { const n = this.id3Track; if (e.samples.length) { - const r = Pe(e.samples, ["emsg"]); - r && r.forEach((s) => { + const i = Pe(e.samples, ["emsg"]); + i && i.forEach((s) => { const a = jS(s); if (UA.test(a.schemeIdUri)) { const o = S1(a, t); @@ -28082,8 +28082,8 @@ class HA { this.config = null, this.remainderData = null, this.videoTrack = this.audioTrack = this.id3Track = this.txtTrack = void 0; } } -function S1(i, e) { - return oe(i.presentationTime) ? i.presentationTime / i.timeScale : e + i.presentationTimeDelta / i.timeScale; +function S1(r, e) { + return oe(r.presentationTime) ? r.presentationTime / r.timeScale : e + r.presentationTimeDelta / r.timeScale; } class GA { constructor(e, t, n) { @@ -28092,17 +28092,17 @@ class GA { }); } decryptBuffer(e) { - return this.decrypter.decrypt(e, this.keyData.key.buffer, this.keyData.iv.buffer, Ir.cbc); + return this.decrypter.decrypt(e, this.keyData.key.buffer, this.keyData.iv.buffer, Ii.cbc); } // AAC - encrypt all full 16 bytes blocks starting from offset 16 decryptAacSample(e, t, n) { - const r = e[t].unit; - if (r.length <= 16) + const i = e[t].unit; + if (i.length <= 16) return; - const s = r.subarray(16, r.length - r.length % 16), a = s.buffer.slice(s.byteOffset, s.byteOffset + s.length); + const s = i.subarray(16, i.length - i.length % 16), a = s.buffer.slice(s.byteOffset, s.byteOffset + s.length); this.decryptBuffer(a).then((o) => { const l = new Uint8Array(o); - r.set(l, 16), this.decrypter.isSync() || this.decryptAacSamples(e, t + 1, n); + i.set(l, 16), this.decrypter.isSync() || this.decryptAacSamples(e, t + 1, n); }).catch(n); } decryptAacSamples(e, t, n) { @@ -28118,36 +28118,36 @@ class GA { // AVC - encrypt one 16 bytes block out of ten, starting from offset 32 getAvcEncryptedData(e) { const t = Math.floor((e.length - 48) / 160) * 16 + 16, n = new Int8Array(t); - let r = 0; - for (let s = 32; s < e.length - 16; s += 160, r += 16) - n.set(e.subarray(s, s + 16), r); + let i = 0; + for (let s = 32; s < e.length - 16; s += 160, i += 16) + n.set(e.subarray(s, s + 16), i); return n; } getAvcDecryptedUnit(e, t) { const n = new Uint8Array(t); - let r = 0; - for (let s = 32; s < e.length - 16; s += 160, r += 16) - e.set(n.subarray(r, r + 16), s); + let i = 0; + for (let s = 32; s < e.length - 16; s += 160, i += 16) + e.set(n.subarray(i, i + 16), s); return e; } - decryptAvcSample(e, t, n, r, s) { + decryptAvcSample(e, t, n, i, s) { const a = Ov(s.data), o = this.getAvcEncryptedData(a); this.decryptBuffer(o.buffer).then((l) => { - s.data = this.getAvcDecryptedUnit(a, l), this.decrypter.isSync() || this.decryptAvcSamples(e, t, n + 1, r); - }).catch(r); + s.data = this.getAvcDecryptedUnit(a, l), this.decrypter.isSync() || this.decryptAvcSamples(e, t, n + 1, i); + }).catch(i); } - decryptAvcSamples(e, t, n, r) { + decryptAvcSamples(e, t, n, i) { if (e instanceof Uint8Array) throw new Error("Cannot decrypt samples of type Uint8Array"); for (; ; t++, n = 0) { if (t >= e.length) { - r(); + i(); return; } const s = e[t].units; for (; !(n >= s.length); n++) { const a = s[n]; - if (!(a.data.length <= 48 || a.type !== 1 && a.type !== 5) && (this.decryptAvcSample(e, t, n, r, a), !this.decrypter.isSync())) + if (!(a.data.length <= 48 || a.type !== 1 && a.type !== 5) && (this.decryptAvcSample(e, t, n, i, a), !this.decrypter.isSync())) return; } } @@ -28169,19 +28169,19 @@ class A2 { } getLastNalUnit(e) { var t; - let n = this.VideoSample, r; + let n = this.VideoSample, i; if ((!n || n.units.length === 0) && (n = e[e.length - 1]), (t = n) != null && t.units) { const s = n.units; - r = s[s.length - 1]; + i = s[s.length - 1]; } - return r; + return i; } pushAccessUnit(e, t) { if (e.units.length && e.frame) { if (e.pts === void 0) { - const n = t.samples, r = n.length; - if (r) { - const s = n[r - 1]; + const n = t.samples, i = n.length; + if (i) { + const s = n[i - 1]; e.pts = s.pts, e.dts = s.dts; } else { t.dropped++; @@ -28192,11 +28192,11 @@ class A2 { } } parseNALu(e, t, n) { - const r = t.byteLength; + const i = t.byteLength; let s = e.naluState || 0; const a = s, o = []; let l = 0, u, c, h, d = -1, f = 0; - for (s === -1 && (d = 0, f = this.getNALuType(t, 0), s = 0, l = 1); l < r; ) { + for (s === -1 && (d = 0, f = this.getNALuType(t, 0), s = 0, l = 1); l < i; ) { if (u = t[l++], !s) { s = u ? 0 : 1; continue; @@ -28218,13 +28218,13 @@ class A2 { const m = this.getLastNalUnit(e.samples); m && (a && l <= 4 - a && m.state && (m.data = m.data.subarray(0, m.data.byteLength - a)), c > 0 && (m.data = Zn(m.data, t.subarray(0, c)), m.state = 0)); } - l < r ? (h = this.getNALuType(t, l), d = l, f = h, s = 0) : s = -1; + l < i ? (h = this.getNALuType(t, l), d = l, f = h, s = 0) : s = -1; } else s = 0; } if (d >= 0 && s >= 0) { const m = { - data: t.subarray(d, r), + data: t.subarray(d, i), type: f, state: s }; @@ -28243,10 +28243,10 @@ class Ra { } // ():void loadWord() { - const e = this.data, t = this.bytesAvailable, n = e.byteLength - t, r = new Uint8Array(4), s = Math.min(4, t); + const e = this.data, t = this.bytesAvailable, n = e.byteLength - t, i = new Uint8Array(4), s = Math.min(4, t); if (s === 0) throw new Error("no bytes available"); - r.set(e.subarray(n, n + s)), this.word = new DataView(r.buffer).getUint32(0), this.bitsAvailable = s * 8, this.bytesAvailable -= s; + i.set(e.subarray(n, n + s)), this.word = new DataView(i.buffer).getUint32(0), this.bitsAvailable = s * 8, this.bytesAvailable -= s; } // (count:int):void skipBits(e) { @@ -28310,8 +28310,8 @@ class Ra { } } class zA extends A2 { - parsePES(e, t, n, r) { - const s = this.parseNALu(e, n.data, r); + parsePES(e, t, n, i) { + const s = this.parseNALu(e, n.data, i); let a = this.VideoSample, o, l = !1; n.data = null, a && s.length && !e.audFound && (this.pushAccessUnit(a, e), a = this.VideoSample = this.createVideoSample(!1, n.pts, n.dts)), s.forEach((u) => { var c, h; @@ -28368,7 +28368,7 @@ class zA extends A2 { break; } a && o && a.units.push(u); - }), r && a && (this.pushAccessUnit(a, e), this.VideoSample = null); + }), i && a && (this.pushAccessUnit(a, e), this.VideoSample = null); } getNALuType(e, t) { return e[t] & 31; @@ -28384,9 +28384,9 @@ class zA extends A2 { * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1 */ skipScalingList(e, t) { - let n = 8, r = 8, s; + let n = 8, i = 8, s; for (let a = 0; a < e; a++) - r !== 0 && (s = t.readEG(), r = (n + s + 256) % 256), n = r === 0 ? n : r; + i !== 0 && (s = t.readEG(), i = (n + s + 256) % 256), n = i === 0 ? n : i; } /** * Read a sequence parameter set and return some interesting video @@ -28398,7 +28398,7 @@ class zA extends A2 { */ readSPS(e) { const t = new Ra(e); - let n = 0, r = 0, s = 0, a = 0, o, l, u; + let n = 0, i = 0, s = 0, a = 0, o, l, u; const c = t.readUByte.bind(t), h = t.readBits.bind(t), d = t.readUEG.bind(t), f = t.readBoolean.bind(t), m = t.skipBits.bind(t), g = t.skipEG.bind(t), p = t.skipUEG.bind(t), b = this.skipScalingList.bind(this); c(); const y = c(); @@ -28417,7 +28417,7 @@ class zA extends A2 { g(); p(), m(1); const T = d(), A = d(), w = h(1); - w === 0 && m(1), m(1), f() && (n = d(), r = d(), s = d(), a = d()); + w === 0 && m(1), m(1), f() && (n = d(), i = d(), s = d(), a = d()); let D = [1, 1]; if (f() && f()) switch (c()) { @@ -28475,7 +28475,7 @@ class zA extends A2 { } } return { - width: Math.ceil((T + 1) * 16 - n * 2 - r * 2), + width: Math.ceil((T + 1) * 16 - n * 2 - i * 2), height: (2 - w) * (A + 1) * 16 - (w ? 2 : 4) * (s + a), pixelRatio: D }; @@ -28485,8 +28485,8 @@ class qA extends A2 { constructor(...e) { super(...e), this.initVPS = null; } - parsePES(e, t, n, r) { - const s = this.parseNALu(e, n.data, r); + parsePES(e, t, n, i) { + const s = this.parseNALu(e, n.data, i); let a = this.VideoSample, o, l = !1; n.data = null, a && s.length && !e.audFound && (this.pushAccessUnit(a, e), a = this.VideoSample = this.createVideoSample(!1, n.pts, n.dts)), s.forEach((u) => { var c, h; @@ -28557,7 +28557,7 @@ class qA extends A2 { break; } a && o && a.units.push(u); - }), r && a && (this.pushAccessUnit(a, e), this.VideoSample = null); + }), i && a && (this.pushAccessUnit(a, e), this.VideoSample = null); } pushParameterSet(e, t, n) { (n && n[0] === this.initVPS || !n && !e.length) && e.push(t); @@ -28568,8 +28568,8 @@ class qA extends A2 { ebsp2rbsp(e) { const t = new Uint8Array(e.byteLength); let n = 0; - for (let r = 0; r < e.byteLength; r++) - r >= 2 && e[r] === 3 && e[r - 1] === 0 && e[r - 2] === 0 || (t[n] = e[r], n++); + for (let i = 0; i < e.byteLength; i++) + i >= 2 && e[i] === 3 && e[i - 1] === 0 && e[i - 2] === 0 || (t[n] = e[i], n++); return new Uint8Array(t.buffer, 0, n); } pushAccessUnit(e, t) { @@ -28578,10 +28578,10 @@ class qA extends A2 { readVPS(e) { const t = new Ra(e); t.readUByte(), t.readUByte(), t.readBits(4), t.skipBits(2), t.readBits(6); - const n = t.readBits(3), r = t.readBoolean(); + const n = t.readBits(3), i = t.readBoolean(); return { numTemporalLayers: n + 1, - temporalIdNested: r + temporalIdNested: i }; } readSPS(e) { @@ -28589,7 +28589,7 @@ class qA extends A2 { t.readUByte(), t.readUByte(), t.readBits(4); const n = t.readBits(3); t.readBoolean(); - const r = t.readBits(2), s = t.readBoolean(), a = t.readBits(5), o = t.readUByte(), l = t.readUByte(), u = t.readUByte(), c = t.readUByte(), h = t.readUByte(), d = t.readUByte(), f = t.readUByte(), m = t.readUByte(), g = t.readUByte(), p = t.readUByte(), b = t.readUByte(), y = [], v = []; + const i = t.readBits(2), s = t.readBoolean(), a = t.readBits(5), o = t.readUByte(), l = t.readUByte(), u = t.readUByte(), c = t.readUByte(), h = t.readUByte(), d = t.readUByte(), f = t.readUByte(), m = t.readUByte(), g = t.readUByte(), p = t.readUByte(), b = t.readUByte(), y = [], v = []; for (let W = 0; W < n; W++) y.push(t.readBoolean()), v.push(t.readBoolean()); if (n > 0) @@ -28653,8 +28653,8 @@ class qA extends A2 { let xe = !1; if (t.readBoolean()) { if (t.readBoolean()) { - const Gt = t.readUByte(), ur = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2], Un = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1]; - Gt > 0 && Gt < 16 ? (q = ur[Gt - 1], se = Un[Gt - 1]) : Gt === 255 && (q = t.readBits(16), se = t.readBits(16)); + const Gt = t.readUByte(), ui = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2], Un = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1]; + Gt > 0 && Gt < 16 ? (q = ui[Gt - 1], se = Un[Gt - 1]) : Gt === 255 && (q = t.readBits(16), se = t.readBits(16)); } if (t.readBoolean() && t.readBoolean(), t.readBoolean() && (t.readBits(3), t.readBoolean(), t.readBoolean() && (t.readUByte(), t.readUByte(), t.readUByte())), t.readBoolean() && (t.readUEG(), t.readUEG()), t.readBoolean(), t.readBoolean(), t.readBoolean(), xe = t.readBoolean(), xe && (t.skipUEG(), t.skipUEG(), t.skipUEG(), t.skipUEG()), t.readBoolean() && (K = t.readBits(32), ge = t.readBits(32), t.readBoolean() && t.readUEG(), t.readBoolean())) { const Un = t.readBoolean(), _n = t.readBoolean(); @@ -28662,9 +28662,9 @@ class qA extends A2 { (Un || _n) && (gt = t.readBoolean(), gt && (t.readUByte(), t.readBits(5), t.readBoolean(), t.readBits(5)), t.readBits(4), t.readBits(4), gt && t.readBits(4), t.readBits(5), t.readBits(5), t.readBits(5)); for (let Ft = 0; Ft <= n; Ft++) { he = t.readBoolean(); - const Mr = he || t.readBoolean(); + const Mi = he || t.readBoolean(); let ee = !1; - Mr ? t.readEG() : ee = t.readBoolean(); + Mi ? t.readEG() : ee = t.readBoolean(); const St = ee ? 1 : t.readUEG() + 1; if (Un) for (let nt = 0; nt < St; nt++) @@ -28681,7 +28681,7 @@ class qA extends A2 { let W = 1, Fe = 1; T === 1 ? W = Fe = 2 : T == 2 && (W = 2), me = A - W * I - W * L, ye = w - Fe * M - Fe * R; } - const Ie = r ? ["A", "B", "C"][r] : "", Rt = o << 24 | l << 16 | u << 8 | c; + const Ie = i ? ["A", "B", "C"][i] : "", Rt = o << 24 | l << 16 | u << 8 | c; let qe = 0; for (let W = 0; W < 32; W++) qe = (qe | (Rt >> W & 1) << 31 - W) >>> 0; @@ -28691,7 +28691,7 @@ class qA extends A2 { params: { general_tier_flag: s, general_profile_idc: a, - general_profile_space: r, + general_profile_space: i, general_profile_compatibility_flags: [o, l, u, c], general_constraint_indicator_flags: [h, d, f, m, g, p], general_level_idc: b, @@ -28713,9 +28713,9 @@ class qA extends A2 { readPPS(e) { const t = new Ra(this.ebsp2rbsp(e)); t.readUByte(), t.readUByte(), t.skipUEG(), t.skipUEG(), t.skipBits(2), t.skipBits(3), t.skipBits(2), t.skipUEG(), t.skipUEG(), t.skipEG(), t.skipBits(2), t.readBoolean() && t.skipUEG(), t.skipEG(), t.skipEG(), t.skipBits(4); - const r = t.readBoolean(), s = t.readBoolean(); + const i = t.readBoolean(), s = t.readBoolean(); let a = 1; - return s && r ? a = 0 : s ? a = 3 : r && (a = 2), { + return s && i ? a = 0 : s ? a = 3 : i && (a = 2), { parallelismType: a }; } @@ -28724,20 +28724,20 @@ class qA extends A2 { } } const $t = 188; -class yr { - constructor(e, t, n, r) { - this.logger = void 0, this.observer = void 0, this.config = void 0, this.typeSupported = void 0, this.sampleAes = null, this.pmtParsed = !1, this.audioCodec = void 0, this.videoCodec = void 0, this._pmtId = -1, this._videoTrack = void 0, this._audioTrack = void 0, this._id3Track = void 0, this._txtTrack = void 0, this.aacOverFlow = null, this.remainderData = null, this.videoParser = void 0, this.observer = e, this.config = t, this.typeSupported = n, this.logger = r, this.videoParser = null; +class yi { + constructor(e, t, n, i) { + this.logger = void 0, this.observer = void 0, this.config = void 0, this.typeSupported = void 0, this.sampleAes = null, this.pmtParsed = !1, this.audioCodec = void 0, this.videoCodec = void 0, this._pmtId = -1, this._videoTrack = void 0, this._audioTrack = void 0, this._id3Track = void 0, this._txtTrack = void 0, this.aacOverFlow = null, this.remainderData = null, this.videoParser = void 0, this.observer = e, this.config = t, this.typeSupported = n, this.logger = i, this.videoParser = null; } static probe(e, t) { - const n = yr.syncOffset(e); + const n = yi.syncOffset(e); return n > 0 && t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`), n !== -1; } static syncOffset(e) { const t = e.length; - let n = Math.min($t * 5, t - $t) + 1, r = 0; - for (; r < n; ) { + let n = Math.min($t * 5, t - $t) + 1, i = 0; + for (; i < n; ) { let s = !1, a = -1, o = 0; - for (let l = r; l < t; l += $t) + for (let l = i; l < t; l += $t) if (e[l] === 71 && (t - l === $t || e[l + $t] === 71)) { if (o++, a === -1 && (a = l, a !== 0 && (n = Math.min(a + $t * 99, e.length - $t) + 1)), s || (s = Gc(e, l) === 0), s && o > 1 && (a === 0 && o > 2 || l + $t > n)) return a; @@ -28746,7 +28746,7 @@ class yr { return -1; break; } - r++; + i++; } return -1; } @@ -28770,8 +28770,8 @@ class yr { * Initializes a new init segment on the demuxer/remuxer interface. Needed for discontinuities/track-switches (or at stream start) * Resets all internal track instances of the demuxer. */ - resetInitSegment(e, t, n, r) { - this.pmtParsed = !1, this._pmtId = -1, this._videoTrack = yr.createTrack("video"), this._videoTrack.duration = r, this._audioTrack = yr.createTrack("audio", r), this._id3Track = yr.createTrack("id3"), this._txtTrack = yr.createTrack("text"), this._audioTrack.segmentCodec = "aac", this.videoParser = null, this.aacOverFlow = null, this.remainderData = null, this.audioCodec = t, this.videoCodec = n; + resetInitSegment(e, t, n, i) { + this.pmtParsed = !1, this._pmtId = -1, this._videoTrack = yi.createTrack("video"), this._videoTrack.duration = i, this._audioTrack = yi.createTrack("audio", i), this._id3Track = yi.createTrack("id3"), this._txtTrack = yi.createTrack("text"), this._audioTrack.segmentCodec = "aac", this.videoParser = null, this.aacOverFlow = null, this.remainderData = null, this.audioCodec = t, this.videoCodec = n; } resetTimeStamp() { } @@ -28783,20 +28783,20 @@ class yr { } = this; e && (e.pesData = null), t && (t.pesData = null), n && (n.pesData = null), this.aacOverFlow = null, this.remainderData = null; } - demux(e, t, n = !1, r = !1) { + demux(e, t, n = !1, i = !1) { n || (this.sampleAes = null); let s; const a = this._videoTrack, o = this._audioTrack, l = this._id3Track, u = this._txtTrack; let c = a.pid, h = a.pesData, d = o.pid, f = l.pid, m = o.pesData, g = l.pesData, p = null, b = this.pmtParsed, y = this._pmtId, v = e.length; - if (this.remainderData && (e = Zn(this.remainderData, e), v = e.length, this.remainderData = null), v < $t && !r) + if (this.remainderData && (e = Zn(this.remainderData, e), v = e.length, this.remainderData = null), v < $t && !i) return this.remainderData = e, { audioTrack: o, videoTrack: a, id3Track: l, textTrack: u }; - const T = Math.max(0, yr.syncOffset(e)); - v -= (v - T) % $t, v < e.byteLength && !r && (this.remainderData = new Uint8Array(e.buffer, v, e.buffer.byteLength - v)); + const T = Math.max(0, yi.syncOffset(e)); + v -= (v - T) % $t, v < e.byteLength && !i && (this.remainderData = new Uint8Array(e.buffer, v, e.buffer.byteLength - v)); let A = 0; for (let D = T; D < v; D += $t) if (e[D] === 71) { @@ -28866,7 +28866,7 @@ class yr { id3Track: l, textTrack: u }; - return r && this.extractRemainingSamples(w), w; + return i && this.extractRemainingSamples(w), w; } flush() { const { @@ -28885,9 +28885,9 @@ class yr { const { audioTrack: t, videoTrack: n, - id3Track: r, + id3Track: i, textTrack: s - } = e, a = n.pesData, o = t.pesData, l = r.pesData; + } = e, a = n.pesData, o = t.pesData, l = i.pesData; let u; if (a && (u = ks(a, this.logger)) ? (this.readyVideoParser(n.segmentCodec), this.videoParser !== null && (this.videoParser.parsePES(n, s, u, !0), n.pesData = null)) : n.pesData = a, o && (u = ks(o, this.logger))) { switch (t.segmentCodec) { @@ -28904,11 +28904,11 @@ class yr { t.pesData = null; } else o != null && o.size && this.logger.log("last AAC PES packet truncated,might overlap between fragments"), t.pesData = o; - l && (u = ks(l, this.logger)) ? (this.parseID3PES(r, u), r.pesData = null) : r.pesData = l; + l && (u = ks(l, this.logger)) ? (this.parseID3PES(i, u), i.pesData = null) : i.pesData = l; } demuxSampleAes(e, t, n) { - const r = this.demux(e, n, !0, !this.config.progressive), s = this.sampleAes = new GA(this.observer, this.config, t); - return this.decrypt(r, s); + const i = this.demux(e, n, !0, !this.config.progressive), s = this.sampleAes = new GA(this.observer, this.config, t); + return this.decrypt(i, s); } readyVideoParser(e) { this.videoParser === null && (e === "avc" ? this.videoParser = new zA() : e === "hevc" && (this.videoParser = new qA())); @@ -28916,10 +28916,10 @@ class yr { decrypt(e, t) { return new Promise((n) => { const { - audioTrack: r, + audioTrack: i, videoTrack: s } = e; - r.samples && r.segmentCodec === "aac" ? t.decryptAacSamples(r.samples, 0, () => { + i.samples && i.segmentCodec === "aac" ? t.decryptAacSamples(i.samples, 0, () => { s.samples ? t.decryptAvcSamples(s.samples, 0, 0, () => { n(e); }) : n(e); @@ -28933,16 +28933,16 @@ class yr { } parseAACPES(e, t) { let n = 0; - const r = this.aacOverFlow; + const i = this.aacOverFlow; let s = t.data; - if (r) { + if (i) { this.aacOverFlow = null; - const h = r.missing, d = r.sample.unit.byteLength; + const h = i.missing, d = i.sample.unit.byteLength; if (h === -1) - s = Zn(r.sample.unit, s); + s = Zn(i.sample.unit, s); else { const f = d - h; - r.sample.unit.set(s.subarray(0, h), f), e.samples.push(r.sample), n = r.missing; + i.sample.unit.set(s.subarray(0, h), f), e.samples.push(i.sample), n = i.missing; } } let a, o; @@ -28958,9 +28958,9 @@ class yr { let l; if (t.pts !== void 0) l = t.pts; - else if (r) { + else if (i) { const h = m2(e.samplerate); - l = r.sample.pts + h; + l = i.sample.pts + h; } else { this.logger.warn("[tsdemuxer]: AAC PES unknown PTS"); return; @@ -28975,14 +28975,14 @@ class yr { ; } parseMPEGPES(e, t) { - const n = t.data, r = n.length; + const n = t.data, i = n.length; let s = 0, a = 0; const o = t.pts; if (o === void 0) { this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS"); return; } - for (; a < r; ) + for (; a < i; ) if (b2(n, a)) { const l = v2(e, n, a, o, s); if (l) @@ -28994,14 +28994,14 @@ class yr { } parseAC3PES(e, t) { { - const n = t.data, r = t.pts; - if (r === void 0) { + const n = t.data, i = t.pts; + if (i === void 0) { this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS"); return; } const s = n.length; let a = 0, o = 0, l; - for (; o < s && (l = T2(e, n, o, r, a++)) > 0; ) + for (; o < s && (l = T2(e, n, o, i, a++)) > 0; ) o += l; } } @@ -29017,23 +29017,23 @@ class yr { e.samples.push(n); } } -function Gc(i, e) { - return ((i[e + 1] & 31) << 8) + i[e + 2]; +function Gc(r, e) { + return ((r[e + 1] & 31) << 8) + r[e + 2]; } -function VA(i, e) { - return (i[e + 10] & 31) << 8 | i[e + 11]; +function VA(r, e) { + return (r[e + 10] & 31) << 8 | r[e + 11]; } -function KA(i, e, t, n, r, s) { +function KA(r, e, t, n, i, s) { const a = { audioPid: -1, videoPid: -1, id3Pid: -1, segmentVideoCodec: "avc", segmentAudioCodec: "aac" - }, o = (i[e + 1] & 15) << 8 | i[e + 2], l = e + 3 + o - 4, u = (i[e + 10] & 15) << 8 | i[e + 11]; + }, o = (r[e + 1] & 15) << 8 | r[e + 2], l = e + 3 + o - 4, u = (r[e + 10] & 15) << 8 | r[e + 11]; for (e += 12 + u; e < l; ) { - const c = Gc(i, e), h = (i[e + 3] & 15) << 8 | i[e + 4]; - switch (i[e]) { + const c = Gc(r, e), h = (r[e + 3] & 15) << 8 | r[e + 4]; + switch (r[e]) { case 207: if (!n) { Bu("ADTS AAC", s); @@ -29069,19 +29069,19 @@ function KA(i, e, t, n, r, s) { if (a.audioPid === -1 && h > 0) { let d = e + 5, f = h; for (; f > 2; ) { - switch (i[d]) { + switch (r[d]) { case 106: t.ac3 !== !0 ? s.log("AC-3 audio found, not supported in this browser for now") : (a.audioPid = c, a.segmentAudioCodec = "ac3"); break; } - const g = i[d + 1] + 2; + const g = r[d + 1] + 2; d += g, f -= g; } } break; case 194: case 135: - return zc(r, new Error("Unsupported EC-3 in M2TS found"), void 0, s), a; + return zc(i, new Error("Unsupported EC-3 in M2TS found"), void 0, s), a; case 36: a.videoPid === -1 && (a.videoPid = c, a.segmentVideoCodec = "hevc", s.log("HEVC in M2TS found")); break; @@ -29090,8 +29090,8 @@ function KA(i, e, t, n, r, s) { } return a; } -function zc(i, e, t, n) { - n.warn(`parsing error: ${e.message}`), i.emit(S.ERROR, S.ERROR, { +function zc(r, e, t, n) { + n.warn(`parsing error: ${e.message}`), r.emit(S.ERROR, S.ERROR, { type: fe.MEDIA_ERROR, details: G.FRAG_PARSING_ERROR, fatal: !1, @@ -29100,18 +29100,18 @@ function zc(i, e, t, n) { reason: e.message }); } -function Bu(i, e) { - e.log(`${i} with AES-128-CBC encryption found in unencrypted stream`); +function Bu(r, e) { + e.log(`${r} with AES-128-CBC encryption found in unencrypted stream`); } -function ks(i, e) { - let t = 0, n, r, s, a, o; - const l = i.data; - if (!i || i.size === 0) +function ks(r, e) { + let t = 0, n, i, s, a, o; + const l = r.data; + if (!r || r.size === 0) return null; for (; l[0].length < 19 && l.length > 1; ) l[0] = Zn(l[0], l[1]), l.splice(1, 1); if (n = l[0], (n[0] << 16) + (n[1] << 8) + n[2] === 1) { - if (r = (n[4] << 8) + n[5], r && r > i.size - 6) + if (i = (n[4] << 8) + n[5], i && i > r.size - 6) return null; const c = n[7]; c & 192 && (a = (n[9] & 14) * 536870912 + // 1 << 29 @@ -29124,10 +29124,10 @@ function ks(i, e) { (n[17] & 255) * 128 + // 1 << 7 (n[18] & 254) / 2, a - o > 60 * 9e4 && (e.warn(`${Math.round((a - o) / 9e4)}s delta between PTS and DTS, align them`), a = o)) : o = a), s = n[8]; let h = s + 9; - if (i.size <= h) + if (r.size <= h) return null; - i.size -= h; - const d = new Uint8Array(i.size); + r.size -= h; + const d = new Uint8Array(r.size); for (let f = 0, m = l.length; f < m; f++) { n = l[f]; let g = n.byteLength; @@ -29139,11 +29139,11 @@ function ks(i, e) { n = n.subarray(h), g -= h, h = 0; d.set(n, t), t += g; } - return r && (r -= s + 3), { + return i && (i -= s + 3), { data: d, pts: a, dts: o, - len: r + len: i }; } return null; @@ -29176,7 +29176,7 @@ class jA { } } } -const gr = Math.pow(2, 32) - 1; +const gi = Math.pow(2, 32) - 1; class H { static init() { H.types = { @@ -29322,7 +29322,7 @@ class H { video: t, audio: n }; - const r = new Uint8Array([ + const i = new Uint8Array([ 0, // version 0 0, @@ -29423,16 +29423,16 @@ class H { 1 ]); const a = new Uint8Array([105, 115, 111, 109]), o = new Uint8Array([97, 118, 99, 49]), l = new Uint8Array([0, 0, 0, 1]); - H.FTYP = H.box(H.types.ftyp, a, l, a, o), H.DINF = H.box(H.types.dinf, H.box(H.types.dref, r)); + H.FTYP = H.box(H.types.ftyp, a, l, a, o), H.DINF = H.box(H.types.dinf, H.box(H.types.dref, i)); } static box(e, ...t) { - let n = 8, r = t.length; - const s = r; - for (; r--; ) - n += t[r].byteLength; + let n = 8, i = t.length; + const s = i; + for (; i--; ) + n += t[i].byteLength; const a = new Uint8Array(n); - for (a[0] = n >> 24 & 255, a[1] = n >> 16 & 255, a[2] = n >> 8 & 255, a[3] = n & 255, a.set(e, 4), r = 0, n = 8; r < s; r++) - a.set(t[r], n), n += t[r].byteLength; + for (a[0] = n >> 24 & 255, a[1] = n >> 16 & 255, a[2] = n >> 8 & 255, a[3] = n & 255, a.set(e, 4), i = 0, n = 8; i < s; i++) + a.set(t[i], n), n += t[i].byteLength; return a; } static hdlr(e) { @@ -29443,7 +29443,7 @@ class H { } static mdhd(e, t) { t *= e; - const n = Math.floor(t / (gr + 1)), r = Math.floor(t % (gr + 1)); + const n = Math.floor(t / (gi + 1)), i = Math.floor(t % (gi + 1)); return H.box(H.types.mdhd, new Uint8Array([ 1, // version 1 @@ -29478,10 +29478,10 @@ class H { n >> 16 & 255, n >> 8 & 255, n & 255, - r >> 24, - r >> 16 & 255, - r >> 8 & 255, - r & 255, + i >> 24, + i >> 16 & 255, + i >> 8 & 255, + i & 255, 85, 196, // 'und' language (undetermined) @@ -29528,7 +29528,7 @@ class H { } static mvhd(e, t) { t *= e; - const n = Math.floor(t / (gr + 1)), r = Math.floor(t % (gr + 1)), s = new Uint8Array([ + const n = Math.floor(t / (gi + 1)), i = Math.floor(t % (gi + 1)), s = new Uint8Array([ 1, // version 1 0, @@ -29562,10 +29562,10 @@ class H { n >> 16 & 255, n >> 8 & 255, n & 255, - r >> 24, - r >> 16 & 255, - r >> 8 & 255, - r & 255, + i >> 24, + i >> 16 & 255, + i >> 8 & 255, + i & 255, 0, 1, 0, @@ -29659,20 +29659,20 @@ class H { } static sdtp(e) { const t = e.samples || [], n = new Uint8Array(4 + t.length); - let r, s; - for (r = 0; r < t.length; r++) - s = t[r].flags, n[r + 4] = s.dependsOn << 4 | s.isDependedOn << 2 | s.hasRedundancy; + let i, s; + for (i = 0; i < t.length; i++) + s = t[i].flags, n[i + 4] = s.dependsOn << 4 | s.isDependedOn << 2 | s.hasRedundancy; return H.box(H.types.sdtp, n); } static stbl(e) { return H.box(H.types.stbl, H.stsd(e), H.box(H.types.stts, H.STTS), H.box(H.types.stsc, H.STSC), H.box(H.types.stsz, H.STSZ), H.box(H.types.stco, H.STCO)); } static avc1(e) { - let t = [], n = [], r, s, a; - for (r = 0; r < e.sps.length; r++) - s = e.sps[r], a = s.byteLength, t.push(a >>> 8 & 255), t.push(a & 255), t = t.concat(Array.prototype.slice.call(s)); - for (r = 0; r < e.pps.length; r++) - s = e.pps[r], a = s.byteLength, n.push(a >>> 8 & 255), n.push(a & 255), n = n.concat(Array.prototype.slice.call(s)); + let t = [], n = [], i, s, a; + for (i = 0; i < e.sps.length; i++) + s = e.sps[i], a = s.byteLength, t.push(a >>> 8 & 255), t.push(a & 255), t = t.concat(Array.prototype.slice.call(s)); + for (i = 0; i < e.pps.length; i++) + s = e.pps[i], a = s.byteLength, n.push(a >>> 8 & 255), n.push(a & 255), n = n.concat(Array.prototype.slice.call(s)); const o = H.box(H.types.avcC, new Uint8Array([ 1, // version @@ -29942,7 +29942,7 @@ class H { throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`); } static tkhd(e) { - const t = e.id, n = (e.duration || 0) * (e.timescale || 0), r = e.width || 0, s = e.height || 0, a = Math.floor(n / (gr + 1)), o = Math.floor(n % (gr + 1)); + const t = e.id, n = (e.duration || 0) * (e.timescale || 0), i = e.width || 0, s = e.height || 0, a = Math.floor(n / (gi + 1)), o = Math.floor(n % (gi + 1)); return H.box(H.types.tkhd, new Uint8Array([ 1, // version 1 @@ -30044,8 +30044,8 @@ class H { 0, 0, // transformation: unity matrix - r >> 8 & 255, - r & 255, + i >> 8 & 255, + i & 255, 0, 0, // width @@ -30057,7 +30057,7 @@ class H { ])); } static traf(e, t) { - const n = H.sdtp(e), r = e.id, s = Math.floor(t / (gr + 1)), a = Math.floor(t % (gr + 1)); + const n = H.sdtp(e), i = e.id, s = Math.floor(t / (gi + 1)), a = Math.floor(t % (gi + 1)); return H.box( H.types.traf, H.box(H.types.tfhd, new Uint8Array([ @@ -30067,10 +30067,10 @@ class H { 0, 0, // flags - r >> 24, - r >> 16 & 255, - r >> 8 & 255, - r & 255 + i >> 24, + i >> 16 & 255, + i >> 8 & 255, + i & 255 // track_ID ])), H.box(H.types.tfdt, new Uint8Array([ @@ -30143,7 +30143,7 @@ class H { ])); } static trun(e, t) { - const n = e.samples || [], r = n.length, s = 12 + 16 * r, a = new Uint8Array(s); + const n = e.samples || [], i = n.length, s = 12 + 16 * i, a = new Uint8Array(s); let o, l, u, c, h, d; for (t += 8 + s, a.set([ e.type === "video" ? 1 : 0, @@ -30152,17 +30152,17 @@ class H { 15, 1, // flags - r >>> 24 & 255, - r >>> 16 & 255, - r >>> 8 & 255, - r & 255, + i >>> 24 & 255, + i >>> 16 & 255, + i >>> 8 & 255, + i & 255, // sample_count t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, t & 255 // data_offset - ], 0), o = 0; o < r; o++) + ], 0), o = 0; o < i; o++) l = n[o], u = l.duration, c = l.size, h = l.flags, d = l.cts, a.set([ u >>> 24 & 255, u >>> 16 & 255, @@ -30193,7 +30193,7 @@ class H { return Zn(H.FTYP, t); } static hvc1(e) { - const t = e.params, n = [e.vps, e.sps, e.pps], r = 4, s = new Uint8Array([1, t.general_profile_space << 6 | (t.general_tier_flag ? 32 : 0) | t.general_profile_idc, t.general_profile_compatibility_flags[0], t.general_profile_compatibility_flags[1], t.general_profile_compatibility_flags[2], t.general_profile_compatibility_flags[3], t.general_constraint_indicator_flags[0], t.general_constraint_indicator_flags[1], t.general_constraint_indicator_flags[2], t.general_constraint_indicator_flags[3], t.general_constraint_indicator_flags[4], t.general_constraint_indicator_flags[5], t.general_level_idc, 240 | t.min_spatial_segmentation_idc >> 8, 255 & t.min_spatial_segmentation_idc, 252 | t.parallelismType, 252 | t.chroma_format_idc, 248 | t.bit_depth_luma_minus8, 248 | t.bit_depth_chroma_minus8, 0, parseInt(t.frame_rate.fps), r - 1 | t.temporal_id_nested << 2 | t.num_temporal_layers << 3 | (t.frame_rate.fixed ? 64 : 0), n.length]); + const t = e.params, n = [e.vps, e.sps, e.pps], i = 4, s = new Uint8Array([1, t.general_profile_space << 6 | (t.general_tier_flag ? 32 : 0) | t.general_profile_idc, t.general_profile_compatibility_flags[0], t.general_profile_compatibility_flags[1], t.general_profile_compatibility_flags[2], t.general_profile_compatibility_flags[3], t.general_constraint_indicator_flags[0], t.general_constraint_indicator_flags[1], t.general_constraint_indicator_flags[2], t.general_constraint_indicator_flags[3], t.general_constraint_indicator_flags[4], t.general_constraint_indicator_flags[5], t.general_level_idc, 240 | t.min_spatial_segmentation_idc >> 8, 255 & t.min_spatial_segmentation_idc, 252 | t.parallelismType, 252 | t.chroma_format_idc, 248 | t.bit_depth_luma_minus8, 248 | t.bit_depth_chroma_minus8, 0, parseInt(t.frame_rate.fps), i - 1 | t.temporal_id_nested << 2 | t.num_temporal_layers << 3 | (t.frame_rate.fixed ? 64 : 0), n.length]); let a = s.length; for (let m = 0; m < n.length; m += 1) { a += 3; @@ -30352,30 +30352,30 @@ H.STSD = void 0; H.FTYP = void 0; H.DINF = void 0; const x2 = 9e4; -function od(i, e, t = 1, n = !1) { - const r = i * e * t; - return n ? Math.round(r) : r; +function od(r, e, t = 1, n = !1) { + const i = r * e * t; + return n ? Math.round(i) : i; } -function WA(i, e, t = 1, n = !1) { - return od(i, e, 1 / t, n); +function WA(r, e, t = 1, n = !1) { + return od(r, e, 1 / t, n); } -function fa(i, e = !1) { - return od(i, 1e3, 1 / x2, e); +function fa(r, e = !1) { + return od(r, 1e3, 1 / x2, e); } -function YA(i, e = 1) { - return od(i, x2, 1 / e); +function YA(r, e = 1) { + return od(r, x2, 1 / e); } -function T1(i) { +function T1(r) { const { baseTime: e, timescale: t, trackId: n - } = i; + } = r; return `${e / t} (${e}/${t}) trackId: ${n}`; } const XA = 10 * 1e3, QA = 1024, ZA = 1152, JA = 1536; let Is = null, Nu = null; -function A1(i, e, t, n) { +function A1(r, e, t, n) { return { duration: e, size: t, @@ -30385,14 +30385,14 @@ function A1(i, e, t, n) { isDependedOn: 0, hasRedundancy: 0, degradPrio: 0, - dependsOn: i ? 2 : 1, - isNonSync: i ? 0 : 1 + dependsOn: r ? 2 : 1, + isNonSync: r ? 0 : 1 } }; } -class cl extends ni { - constructor(e, t, n, r) { - if (super("mp4-remuxer", r), this.observer = void 0, this.config = void 0, this.typeSupported = void 0, this.ISGenerated = !1, this._initPTS = null, this._initDTS = null, this.nextVideoTs = null, this.nextAudioTs = null, this.videoSampleDuration = null, this.isAudioContiguous = !1, this.isVideoContiguous = !1, this.videoTrackConfig = void 0, this.observer = e, this.config = t, this.typeSupported = n, this.ISGenerated = !1, Is === null) { +class cl extends nr { + constructor(e, t, n, i) { + if (super("mp4-remuxer", i), this.observer = void 0, this.config = void 0, this.typeSupported = void 0, this.ISGenerated = !1, this._initPTS = null, this._initDTS = null, this.nextVideoTs = null, this.nextAudioTs = null, this.videoSampleDuration = null, this.isAudioContiguous = !1, this.isVideoContiguous = !1, this.videoTrackConfig = void 0, this.observer = e, this.config = t, this.typeSupported = n, this.ISGenerated = !1, Is === null) { const a = (navigator.userAgent || "").match(/Chrome\/(\d+)/i); Is = a ? parseInt(a[1]) : 0; } @@ -30416,13 +30416,13 @@ class cl extends ni { } getVideoStartPts(e) { let t = !1; - const n = e[0].pts, r = e.reduce((s, a) => { + const n = e[0].pts, i = e.reduce((s, a) => { let o = a.pts, l = o - s; return l < -4294967296 && (t = !0, o = In(o, n), l = o - s), l > 0 ? s : o; }, n); - return t && this.debug("PTS rollover detected"), r; + return t && this.debug("PTS rollover detected"), i; } - remux(e, t, n, r, s, a, o, l) { + remux(e, t, n, i, s, a, o, l) { let u, c, h, d, f, m, g = s, p = s; const b = e.pid > -1, y = t.pid > -1, v = t.samples.length, T = e.samples.length > 0, A = o && v > 0 || v > 1; if ((!b || T) && (!y || A) || this.ISGenerated || o) { @@ -30454,7 +30454,7 @@ class cl extends ni { u && (u.firstKeyFrame = P, u.independent = P !== -1, u.firstKeyFramePTS = V); } } - return this.ISGenerated && this._initPTS && this._initDTS && (n.samples.length && (f = w2(n, s, this._initPTS, this._initDTS)), r.samples.length && (d = D2(r, s, this._initPTS))), { + return this.ISGenerated && this._initPTS && this._initDTS && (n.samples.length && (f = w2(n, s, this._initPTS, this._initDTS)), i.samples.length && (d = D2(i, s, this._initPTS))), { audio: c, video: u, initSegment: h, @@ -30463,17 +30463,17 @@ class cl extends ni { id3: f }; } - computeInitPts(e, t, n, r) { + computeInitPts(e, t, n, i) { const s = Math.round(n * t); let a = In(e, s); if (a < s + t) - for (this.log(`Adjusting PTS for rollover in timeline near ${(s - a) / t} ${r}`); a < s + t; ) + for (this.log(`Adjusting PTS for rollover in timeline near ${(s - a) / t} ${i}`); a < s + t; ) a += 8589934592; return a - s; } - generateIS(e, t, n, r) { + generateIS(e, t, n, i) { const s = e.samples, a = t.samples, o = this.typeSupported, l = {}, u = this._initPTS; - let c = !u || r, h = "audio/mp4", d, f, m, g = -1; + let c = !u || i, h = "audio/mp4", d, f, m, g = -1; if (c && (d = f = 1 / 0), e.config && s.length) { switch (e.timescale = e.samplerate, e.segmentCodec) { case "mp3": @@ -30516,7 +30516,7 @@ class cl extends ni { }; } if (Object.keys(l).length) - return this.ISGenerated = !0, c ? (u && this.warn(`Timestamps at playlist time: ${r ? "" : "~"}${n} ${d / m} != initPTS: ${u.baseTime / u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`), this.log(`Found initPTS at playlist time: ${n} offset: ${d / m} (${d}/${m}) trackId: ${g}`), this._initPTS = { + return this.ISGenerated = !0, c ? (u && this.warn(`Timestamps at playlist time: ${i ? "" : "~"}${n} ${d / m} != initPTS: ${u.baseTime / u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`), this.log(`Found initPTS at playlist time: ${n} offset: ${d / m} (${d}/${m}) trackId: ${g}`), this._initPTS = { baseTime: d, timescale: m, trackId: g @@ -30531,7 +30531,7 @@ class cl extends ni { trackId: g }; } - remuxVideo(e, t, n, r) { + remuxVideo(e, t, n, i) { const s = e.inputTimeScale, a = e.samples, o = [], l = a.length, u = this._initPTS, c = u.baseTime * s / u.timescale; let h = this.nextVideoTs, d = 8, f = this.videoSampleDuration, m, g, p = Number.POSITIVE_INFINITY, b = Number.NEGATIVE_INFINITY, y = !1; if (!n || h === null) { @@ -30609,7 +30609,7 @@ class cl extends ni { else { const xe = this.config, j = B > 0 ? q.dts - a[B - 1].dts : A; if (K = B > 0 ? q.pts - a[B - 1].pts : A, xe.stretchShortVideoTrack && this.nextAudioTs !== null) { - const me = Math.floor(xe.maxBufferHole * s), ye = (r ? p + r * s : this.nextAudioTs + c) - q.pts; + const me = Math.floor(xe.maxBufferHole * s), ye = (i ? p + i * s : this.nextAudioTs + c) - q.pts; ye > me ? (f = ye - j, f < 0 ? f = j : P = !0, this.log(`It is approximately ${ye / 90} ms to the next segment; using duration ${f / 90} ms for the last video frame.`)) : f = j; } else f = j; @@ -30667,17 +30667,17 @@ class cl extends ni { return QA; } } - remuxAudio(e, t, n, r, s) { + remuxAudio(e, t, n, i, s) { const a = e.inputTimeScale, o = e.samplerate ? e.samplerate : a, l = a / o, u = this.getSamplesPerFrame(e), c = u * l, h = this._initPTS, d = e.segmentCodec === "mp3" && this.typeSupported.mpeg, f = [], m = s !== void 0; let g = e.samples, p = d ? 0 : 8, b = this.nextAudioTs || -1; const y = h.baseTime * a / h.timescale, v = y + t * a; - if (this.isAudioContiguous = n = n || g.length && b > 0 && (r && Math.abs(v - (b + y)) < 9e3 || Math.abs(In(g[0].pts, v) - (b + y)) < 20 * c), g.forEach(function(Y) { + if (this.isAudioContiguous = n = n || g.length && b > 0 && (i && Math.abs(v - (b + y)) < 9e3 || Math.abs(In(g[0].pts, v) - (b + y)) < 20 * c), g.forEach(function(Y) { Y.pts = In(Y.pts, v); }), !n || b < 0) { const Y = g.length; if (g = g.filter((X) => X.pts >= 0), Y !== g.length && this.warn(`Removed ${g.length - Y} of ${Y} samples (initPTS ${y} / ${a})`), !g.length) return; - s === 0 ? b = 0 : r && !m ? b = Math.max(0, v - y) : b = g[0].pts - y; + s === 0 ? b = 0 : i && !m ? b = Math.max(0, v - y) : b = g[0].pts - y; } if (e.segmentCodec === "aac") { const Y = this.config.maxAudioFramesDrift; @@ -30756,52 +30756,52 @@ class cl extends ni { return this.isAudioContiguous = !0, J; } } -function In(i, e) { +function In(r, e) { let t; if (e === null) - return i; - for (e < i ? t = -8589934592 : t = 8589934592; Math.abs(i - e) > 4294967296; ) - i += t; - return i; + return r; + for (e < r ? t = -8589934592 : t = 8589934592; Math.abs(r - e) > 4294967296; ) + r += t; + return r; } -function ex(i) { - for (let e = 0; e < i.length; e++) - if (i[e].key) +function ex(r) { + for (let e = 0; e < r.length; e++) + if (r[e].key) return e; return -1; } -function w2(i, e, t, n) { - const r = i.samples.length; - if (!r) +function w2(r, e, t, n) { + const i = r.samples.length; + if (!i) return; - const s = i.inputTimeScale; - for (let o = 0; o < r; o++) { - const l = i.samples[o]; + const s = r.inputTimeScale; + for (let o = 0; o < i; o++) { + const l = r.samples[o]; l.pts = In(l.pts - t.baseTime * s / t.timescale, e * s) / s, l.dts = In(l.dts - n.baseTime * s / n.timescale, e * s) / s; } - const a = i.samples; - return i.samples = [], { + const a = r.samples; + return r.samples = [], { samples: a }; } -function D2(i, e, t) { - const n = i.samples.length; +function D2(r, e, t) { + const n = r.samples.length; if (!n) return; - const r = i.inputTimeScale; + const i = r.inputTimeScale; for (let a = 0; a < n; a++) { - const o = i.samples[a]; - o.pts = In(o.pts - t.baseTime * r / t.timescale, e * r) / r; + const o = r.samples[a]; + o.pts = In(o.pts - t.baseTime * i / t.timescale, e * i) / i; } - i.samples.sort((a, o) => a.pts - o.pts); - const s = i.samples; - return i.samples = [], { + r.samples.sort((a, o) => a.pts - o.pts); + const s = r.samples; + return r.samples = [], { samples: s }; } -class tx extends ni { - constructor(e, t, n, r) { - super("passthrough-remuxer", r), this.emitInitSegment = !1, this.audioCodec = void 0, this.videoCodec = void 0, this.initData = void 0, this.initPTS = null, this.initTracks = void 0, this.lastEndTime = null, this.isVideoContiguous = !1; +class tx extends nr { + constructor(e, t, n, i) { + super("passthrough-remuxer", i), this.emitInitSegment = !1, this.audioCodec = void 0, this.videoCodec = void 0, this.initData = void 0, this.initPTS = null, this.initTracks = void 0, this.lastEndTime = null, this.isVideoContiguous = !1; } destroy() { } @@ -30813,13 +30813,13 @@ class tx extends ni { resetNextTimestamp() { this.isVideoContiguous = !1, this.lastEndTime = null; } - resetInitSegment(e, t, n, r) { - this.audioCodec = t, this.videoCodec = n, this.generateInitSegment(e, r), this.emitInitSegment = !0; + resetInitSegment(e, t, n, i) { + this.audioCodec = t, this.videoCodec = n, this.generateInitSegment(e, i), this.emitInitSegment = !0; } generateInitSegment(e, t) { let { audioCodec: n, - videoCodec: r + videoCodec: i } = this; if (!(e != null && e.byteLength)) { this.initTracks = void 0, this.initData = void 0; @@ -30835,11 +30835,11 @@ class tx extends ni { const l = s || a; l != null && l.encrypted && this.warn(`Init segment with encrypted track with has no key ("${l.codec}")!`); } - s && (n = x1(s, Je.AUDIO, this)), a && (r = x1(a, Je.VIDEO, this)); + s && (n = x1(s, Je.AUDIO, this)), a && (i = x1(a, Je.VIDEO, this)); const o = {}; s && a ? o.audiovideo = { container: "video/mp4", - codec: n + "," + r, + codec: n + "," + i, supplemental: a.supplemental, encrypted: a.encrypted, initSegment: e, @@ -30852,14 +30852,14 @@ class tx extends ni { id: "audio" } : a ? o.video = { container: "video/mp4", - codec: r, + codec: i, supplemental: a.supplemental, encrypted: a.encrypted, initSegment: e, id: "main" } : this.warn("initSegment does not contain moov or trak boxes."), this.initTracks = o; } - remux(e, t, n, r, s, a) { + remux(e, t, n, i, s, a) { var o, l; let { initPTS: u, @@ -30868,7 +30868,7 @@ class tx extends ni { const h = { audio: void 0, video: void 0, - text: r, + text: i, id3: n, initSegment: void 0 }; @@ -30922,33 +30922,33 @@ class tx extends ni { const $ = b.keyFrameIndex, Z = $ !== -1; Y.nb = X, Y.dropped = $ === 0 || this.isVideoContiguous ? 0 : Z ? $ : X, Y.independent = Z, Y.firstKeyFrame = $, Z && b.keyFrameStart && (Y.firstKeyFramePTS = (b.keyFrameStart - u.baseTime) / u.timescale), this.isVideoContiguous || (h.independent = Z), this.isVideoContiguous || (this.isVideoContiguous = Z), Y.dropped && this.warn(`fmp4 does not start with IDR: firstIDR ${$}/${X} dropped: ${Y.dropped} start: ${Y.firstKeyFramePTS || "NA"}`); } - return h.initSegment = f, h.id3 = w2(n, s, u, u), r.samples.length && (h.text = D2(r, s, u)), h; + return h.initSegment = f, h.id3 = w2(n, s, u, u), i.samples.length && (h.text = D2(i, s, u)), h; } } -function Go(i, e, t = !1) { - return (i == null ? void 0 : i.start) !== void 0 ? (i.start + (t ? i.duration : 0)) / i.timescale : e; +function Go(r, e, t = !1) { + return (r == null ? void 0 : r.start) !== void 0 ? (r.start + (t ? r.duration : 0)) / r.timescale : e; } -function nx(i, e, t, n) { - if (i === null) +function nx(r, e, t, n) { + if (r === null) return !0; - const r = Math.max(n, 1), s = e - i.baseTime / i.timescale; - return Math.abs(s - t) > r; + const i = Math.max(n, 1), s = e - r.baseTime / r.timescale; + return Math.abs(s - t) > i; } -function x1(i, e, t) { - const n = i.codec; +function x1(r, e, t) { + const n = r.codec; return n && n.length > 4 ? n : e === Je.AUDIO ? n === "ec-3" || n === "ac-3" || n === "alac" ? n : n === "fLaC" || n === "Opus" ? $l(n, !1) : (t.warn(`Unhandled audio codec "${n}" in mp4 MAP`), n || "mp4a") : (t.warn(`Unhandled video codec "${n}" in mp4 MAP`), n || "avc1"); } -let er; +let ei; try { - er = self.performance.now.bind(self.performance); + ei = self.performance.now.bind(self.performance); } catch { - er = Date.now; + ei = Date.now; } const hl = [{ demux: HA, remux: tx }, { - demux: yr, + demux: yi, remux: cl }, { demux: BA, @@ -30962,21 +30962,21 @@ hl.splice(2, 0, { remux: cl }); class w1 { - constructor(e, t, n, r, s, a) { + constructor(e, t, n, i, s, a) { this.asyncResult = !1, this.logger = void 0, this.observer = void 0, this.typeSupported = void 0, this.config = void 0, this.id = void 0, this.demuxer = void 0, this.remuxer = void 0, this.decrypter = void 0, this.probe = void 0, this.decryptionPromise = null, this.transmuxConfig = void 0, this.currentTransmuxState = void 0, this.observer = e, this.typeSupported = t, this.config = n, this.id = s, this.logger = a; } configure(e) { this.transmuxConfig = e, this.decrypter && this.decrypter.reset(); } - push(e, t, n, r) { + push(e, t, n, i) { const s = n.transmuxing; - s.executeStart = er(); + s.executeStart = ei(); let a = new Uint8Array(e); const { currentTransmuxState: o, transmuxConfig: l } = this; - r && (this.currentTransmuxState = r); + i && (this.currentTransmuxState = i); const { contiguous: u, discontinuity: c, @@ -30984,13 +30984,13 @@ class w1 { accurateTimeOffset: d, timeOffset: f, initSegmentChange: m - } = r || o, { + } = i || o, { audioCodec: g, videoCodec: p, defaultInitPts: b, duration: y, initSegmentData: v - } = l, T = ix(a, t); + } = l, T = rx(a, t); if (T && Us(T.method)) { const L = this.getDecrypter(), I = Zh(T.method); if (L.isSync()) { @@ -31000,7 +31000,7 @@ class w1 { R = P && P.buffer; } if (!R) - return s.executeEnd = er(), $u(n); + return s.executeEnd = ei(), $u(n); a = new Uint8Array(R); } else return this.asyncResult = !0, this.decryptionPromise = L.webCryptoDecrypt(a, T.key.buffer, T.iv.buffer, I).then((R) => { @@ -31018,28 +31018,28 @@ class w1 { fatal: !1, error: L, reason: L.message - }), s.executeEnd = er(), $u(n); + }), s.executeEnd = ei(), $u(n); } (c || h || m || A) && this.resetInitSegment(v, g, p, y, t), (c || m || A) && this.resetInitialTimestamp(b), u || this.resetContiguity(); const w = this.transmux(a, T, f, d, n); this.asyncResult = Ya(w); const D = this.currentTransmuxState; - return D.contiguous = !0, D.discontinuity = !1, D.trackSwitch = !1, s.executeEnd = er(), w; + return D.contiguous = !0, D.discontinuity = !1, D.trackSwitch = !1, s.executeEnd = ei(), w; } // Due to data caching, flush calls can produce more than one TransmuxerResult (hence the Array type) flush(e) { const t = e.transmuxing; - t.executeStart = er(); + t.executeStart = ei(); const { decrypter: n, - currentTransmuxState: r, + currentTransmuxState: i, decryptionPromise: s } = this; if (s) return this.asyncResult = !0, s.then(() => this.flush(e)); const a = [], { timeOffset: o - } = r; + } = i; if (n) { const h = n.flush(); h && a.push(this.push(h.buffer, null, e)); @@ -31049,7 +31049,7 @@ class w1 { remuxer: u } = this; if (!l || !u) { - t.executeEnd = er(); + t.executeEnd = ei(); const h = [$u(e)]; return this.asyncResult ? Promise.resolve(h) : h; } @@ -31058,7 +31058,7 @@ class w1 { } flushRemux(e, t, n) { const { - audioTrack: r, + audioTrack: i, videoTrack: s, id3Track: a, textTrack: o @@ -31067,11 +31067,11 @@ class w1 { timeOffset: u } = this.currentTransmuxState; this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part > -1 ? " part: " + n.part : ""} of ${this.id === ce.MAIN ? "level" : "track"} ${n.level}`); - const c = this.remuxer.remux(r, s, a, o, u, l, !0, this.id); + const c = this.remuxer.remux(i, s, a, o, u, l, !0, this.id); e.push({ remuxResult: c, chunkMeta: n - }), n.transmuxing.executeEnd = er(); + }), n.transmuxing.executeEnd = ei(); } resetInitialTimestamp(e) { const { @@ -31087,21 +31087,21 @@ class w1 { } = this; !e || !t || (e.resetContiguity(), t.resetNextTimestamp()); } - resetInitSegment(e, t, n, r, s) { + resetInitSegment(e, t, n, i, s) { const { demuxer: a, remuxer: o } = this; - !a || !o || (a.resetInitSegment(e, t, n, r), o.resetInitSegment(e, t, n, s)); + !a || !o || (a.resetInitSegment(e, t, n, i), o.resetInitSegment(e, t, n, s)); } destroy() { this.demuxer && (this.demuxer.destroy(), this.demuxer = void 0), this.remuxer && (this.remuxer.destroy(), this.remuxer = void 0); } - transmux(e, t, n, r, s) { + transmux(e, t, n, i, s) { let a; - return t && t.method === "SAMPLE-AES" ? a = this.transmuxSampleAes(e, t, n, r, s) : a = this.transmuxUnencrypted(e, n, r, s), a; + return t && t.method === "SAMPLE-AES" ? a = this.transmuxSampleAes(e, t, n, i, s) : a = this.transmuxUnencrypted(e, n, i, s), a; } - transmuxUnencrypted(e, t, n, r) { + transmuxUnencrypted(e, t, n, i) { const { audioTrack: s, videoTrack: a, @@ -31110,12 +31110,12 @@ class w1 { } = this.demuxer.demux(e, t, !1, !this.config.progressive); return { remuxResult: this.remuxer.remux(s, a, o, l, t, n, !1, this.id), - chunkMeta: r + chunkMeta: i }; } - transmuxSampleAes(e, t, n, r, s) { + transmuxSampleAes(e, t, n, i, s) { return this.demuxer.demuxSampleAes(e, t, n).then((a) => ({ - remuxResult: this.remuxer.remux(a.audioTrack, a.videoTrack, a.id3Track, a.textTrack, n, r, !1, this.id), + remuxResult: this.remuxer.remux(a.audioTrack, a.videoTrack, a.id3Track, a.textTrack, n, i, !1, this.id), chunkMeta: s })); } @@ -31123,7 +31123,7 @@ class w1 { const { config: t, observer: n, - typeSupported: r + typeSupported: i } = this; let s; for (let h = 0, d = hl.length; h < d; h++) { @@ -31136,7 +31136,7 @@ class w1 { if (!s) return new Error("Failed to find demuxer by probing fragment data"); const o = this.demuxer, l = this.remuxer, u = s.remux, c = s.demux; - (!l || !(l instanceof u)) && (this.remuxer = new u(n, t, r, this.logger)), (!o || !(o instanceof c)) && (this.demuxer = new c(n, t, r, this.logger), this.probe = c.probe); + (!l || !(l instanceof u)) && (this.remuxer = new u(n, t, i, this.logger)), (!o || !(o instanceof c)) && (this.demuxer = new c(n, t, i, this.logger), this.probe = c.probe); } needsProbing(e, t) { return !this.demuxer || !this.remuxer || e || t; @@ -31146,30 +31146,30 @@ class w1 { return e || (e = this.decrypter = new Xh(this.config)), e; } } -function ix(i, e) { +function rx(r, e) { let t = null; - return i.byteLength > 0 && (e == null ? void 0 : e.key) != null && e.iv !== null && e.method != null && (t = e), t; + return r.byteLength > 0 && (e == null ? void 0 : e.key) != null && e.iv !== null && e.method != null && (t = e), t; } -const $u = (i) => ({ +const $u = (r) => ({ remuxResult: {}, - chunkMeta: i + chunkMeta: r }); -function Ya(i) { - return "then" in i && i.then instanceof Function; +function Ya(r) { + return "then" in r && r.then instanceof Function; } -class rx { - constructor(e, t, n, r, s) { - this.audioCodec = void 0, this.videoCodec = void 0, this.initSegmentData = void 0, this.duration = void 0, this.defaultInitPts = void 0, this.audioCodec = e, this.videoCodec = t, this.initSegmentData = n, this.duration = r, this.defaultInitPts = s || null; +class ix { + constructor(e, t, n, i, s) { + this.audioCodec = void 0, this.videoCodec = void 0, this.initSegmentData = void 0, this.duration = void 0, this.defaultInitPts = void 0, this.audioCodec = e, this.videoCodec = t, this.initSegmentData = n, this.duration = i, this.defaultInitPts = s || null; } } class sx { - constructor(e, t, n, r, s, a) { - this.discontinuity = void 0, this.contiguous = void 0, this.accurateTimeOffset = void 0, this.trackSwitch = void 0, this.timeOffset = void 0, this.initSegmentChange = void 0, this.discontinuity = e, this.contiguous = t, this.accurateTimeOffset = n, this.trackSwitch = r, this.timeOffset = s, this.initSegmentChange = a; + constructor(e, t, n, i, s, a) { + this.discontinuity = void 0, this.contiguous = void 0, this.accurateTimeOffset = void 0, this.trackSwitch = void 0, this.timeOffset = void 0, this.initSegmentChange = void 0, this.discontinuity = e, this.contiguous = t, this.accurateTimeOffset = n, this.trackSwitch = i, this.timeOffset = s, this.initSegmentChange = a; } } let D1 = 0; class k2 { - constructor(e, t, n, r) { + constructor(e, t, n, i) { this.error = null, this.hls = void 0, this.id = void 0, this.instanceNo = D1++, this.observer = void 0, this.frag = null, this.part = null, this.useWorker = void 0, this.workerContext = null, this.transmuxer = null, this.onTransmuxComplete = void 0, this.onFlush = void 0, this.onWorkerMessage = (l) => { const u = l.data, c = this.hls; if (!(!c || !(u != null && u.event) || u.instanceNo !== this.instanceNo)) @@ -31210,7 +31210,7 @@ class k2 { }); }; const s = e.config; - this.hls = e, this.id = t, this.useWorker = !!s.enableWorker, this.onTransmuxComplete = n, this.onFlush = r; + this.hls = e, this.id = t, this.useWorker = !!s.enableWorker, this.onTransmuxComplete = n, this.onFlush = i; const a = (l, u) => { u = u || {}, u.frag = this.frag || void 0, l === S.ERROR && (u = u, u.parent = this.id, u.part = this.part, this.error = u.error), this.hls.trigger(l, u); }; @@ -31272,7 +31272,7 @@ class k2 { const e = this.observer; e && e.removeAllListeners(), this.frag = null, this.part = null, this.observer = null, this.hls = null; } - push(e, t, n, r, s, a, o, l, u, c) { + push(e, t, n, i, s, a, o, l, u, c) { var h, d; u.transmuxing.start = self.performance.now(); const { @@ -31289,7 +31289,7 @@ class k2 { accurateTimeOffset: ${l} timeOffset: ${g} initSegmentChange: ${I}`); - const M = new rx(n, r, t, o, c); + const M = new ix(n, i, t, o, c); this.configureTransmuxer(M); } if (this.frag = s, this.part = a, this.workerContext) @@ -31323,12 +31323,12 @@ class k2 { chunkMeta: e }); else if (n) { - const r = n.flush(e); - Ya(r) ? r.then((s) => { + const i = n.flush(e); + Ya(i) ? i.then((s) => { this.handleFlushResult(s, e); }).catch((s) => { this.transmuxerError(s, e, "transmuxer-interface flush error"); - }) : this.handleFlushResult(r, e); + }) : this.handleFlushResult(i, e); } } transmuxerError(e, t, n) { @@ -31392,17 +31392,17 @@ class ax extends ed { onInitPtsFound(e, { frag: t, id: n, - initPTS: r, + initPTS: i, timescale: s, trackId: a }) { if (n === ce.MAIN) { const o = t.cc, l = this.fragCurrent; if (this.initPTS[o] = { - baseTime: r, + baseTime: i, timescale: s, trackId: a - }, this.log(`InitPTS for cc: ${o} found from main: ${r / s} (${r}/${s}) trackId: ${a}`), this.mainAnchor = t, this.state === Q.WAITING_INIT_PTS) { + }, this.log(`InitPTS for cc: ${o} found from main: ${i / s} (${i}/${s}) trackId: ${a}`), this.mainAnchor = t, this.state === Q.WAITING_INIT_PTS) { const u = this.waitingData; (!u && !this.loadingParts || u && u.frag.cc !== o) && this.syncWithAnchor(t, u == null ? void 0 : u.frag); } else !this.hls.hasEnoughToStart && l && l.cc !== o ? (l.abortRequests(), this.syncWithAnchor(t, l)) : this.state === Q.IDLE && this.tick(); @@ -31413,10 +31413,10 @@ class ax extends ed { } syncWithAnchor(e, t) { var n; - const r = ((n = this.mainFragLoading) == null ? void 0 : n.frag) || null; - if (t && (r == null ? void 0 : r.cc) === t.cc) + const i = ((n = this.mainFragLoading) == null ? void 0 : n.frag) || null; + if (t && (i == null ? void 0 : i.cc) === t.cc) return; - const s = (r || e).cc, a = this.getLevelDetails(), o = this.getLoadPosition(), l = qv(a, s, o); + const s = (i || e).cc, a = this.getLevelDetails(), o = this.getLoadPosition(), l = qv(a, s, o); l && (this.log(`Syncing with main frag at ${l.start} cc ${l.cc}`), this.startFragRequested = !1, this.nextLoadPosition = l.start, this.resetLoadingState(), this.state === Q.IDLE && this.doTickIdle()); } startLoad(e, t) { @@ -31436,9 +31436,9 @@ class ax extends ed { const { levels: e, trackId: t - } = this, n = e == null ? void 0 : e[t], r = n == null ? void 0 : n.details; - if (r && !this.waitForLive(n)) { - if (this.waitForCdnTuneIn(r)) + } = this, n = e == null ? void 0 : e[t], i = n == null ? void 0 : n.details; + if (i && !this.waitForLive(n)) { + if (this.waitForCdnTuneIn(i)) break; this.state = Q.WAITING_INIT_PTS; } @@ -31454,12 +31454,12 @@ class ax extends ed { const { frag: t, part: n, - cache: r, + cache: i, complete: s } = e, a = this.mainAnchor; if (this.initPTS[t.cc] !== void 0) { this.waitingData = null, this.state = Q.FRAG_LOADING; - const o = r.flush().buffer, l = { + const o = i.flush().buffer, l = { frag: t, part: n, payload: o, @@ -31488,10 +31488,10 @@ class ax extends ed { const { hls: t, levels: n, - media: r, + media: i, trackId: s } = this, a = t.config; - if (!this.buffering || !r && !this.primaryPrefetch && (this.startFragRequested || !a.startFragPrefetch) || !(n != null && n[s])) + if (!this.buffering || !i && !this.primaryPrefetch && (this.startFragRequested || !a.startFragPrefetch) || !(n != null && n[s])) return; const o = n[s], l = o.details; if (!l || this.waitForLive(o) || this.waitForCdnTuneIn(l)) { @@ -31510,9 +31510,9 @@ class ax extends ed { return; } const h = c.len, d = t.maxBufferLength, f = l.fragments, m = f[0].start, g = this.getLoadPosition(), p = this.flushing ? g : c.end; - if (this.switchingTrack && r) { + if (this.switchingTrack && i) { const v = g; - l.PTSKnown && v < m && (c.end > m || c.nextStart) && (this.log("Alt audio track ahead of main track, seek to start of alt audio track"), r.currentTime = m + 0.05); + l.PTSKnown && v < m && (c.end > m || c.nextStart) && (this.log("Alt audio track ahead of main track, seek to start of alt audio track"), i.currentTime = m + 0.05); } if (h >= d && !this.switchingTrack && p < f[f.length - 1].start) return; @@ -31547,9 +31547,9 @@ class ax extends ed { const n = !!t.url; this.trackId = t.id; const { - fragCurrent: r + fragCurrent: i } = this; - r && (r.abortRequests(), this.removeUnbufferedFrags(r.start)), this.resetLoadingState(), n ? (this.switchingTrack = t, this.flushAudioIfNeeded(t), this.state !== Q.STOPPED && (this.setInterval(k1), this.state = Q.IDLE, this.tick())) : (this.resetTransmuxer(), this.switchingTrack = null, this.bufferedTrack = t, this.clearInterval()); + i && (i.abortRequests(), this.removeUnbufferedFrags(i.start)), this.resetLoadingState(), n ? (this.switchingTrack = t, this.flushAudioIfNeeded(t), this.state !== Q.STOPPED && (this.setInterval(k1), this.state = Q.IDLE, this.tick())) : (this.resetTransmuxer(), this.switchingTrack = null, this.bufferedTrack = t, this.clearInterval()); } onManifestLoading() { super.onManifestLoading(), this.bufferFlushed = this.flushing = this.audioOnly = !1, this.resetItem(), this.trackId = -1; @@ -31562,14 +31562,14 @@ class ax extends ed { onAudioTrackLoaded(e, t) { var n; const { - levels: r + levels: i } = this, { details: s, id: a, groupId: o, track: l } = t; - if (!r) { + if (!i) { this.warn(`Audio tracks reset while loading track ${a} "${l.name}" of "${o}"`); return; } @@ -31579,7 +31579,7 @@ class ax extends ed { return; } this.cachedTrackLoadedData = null, this.log(`Audio track ${a} "${l.name}" of "${o}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn ? `[part-${s.lastPartSn}-${s.lastPartIndex}]` : ""},duration:${s.totalduration}`); - const c = r[a]; + const c = i[a]; let h = 0; if (s.live || (n = c.details) != null && n.live) { if (this.checkLiveUpdate(s), s.deltaUpdateFailed) @@ -31599,7 +31599,7 @@ class ax extends ed { _handleFragmentLoadProgress(e) { var t; const n = e.frag, { - part: r, + part: i, payload: s } = e, { config: a, @@ -31625,15 +31625,15 @@ class ax extends ed { d || (d = this.transmuxer = new k2(this.hls, ce.AUDIO, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this))); const f = this.initPTS[n.cc], m = (t = n.initSegment) == null ? void 0 : t.data; if (f !== void 0) { - const p = r ? r.index : -1, b = p !== -1, y = new Qh(n.level, n.sn, n.stats.chunkCount, s.byteLength, p, b); - d.push(s, m, h, "", n, r, c.totalduration, !1, y, f); + const p = i ? i.index : -1, b = p !== -1, y = new Qh(n.level, n.sn, n.stats.chunkCount, s.byteLength, p, b); + d.push(s, m, h, "", n, i, c.totalduration, !1, y, f); } else { this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${c.startSN} ,${c.endSN}],track ${o}`); const { cache: g } = this.waitingData = this.waitingData || { frag: n, - part: r, + part: i, cache: new u2(), complete: !1 }; @@ -31661,14 +31661,14 @@ class ax extends ed { onFragBuffered(e, t) { const { frag: n, - part: r + part: i } = t; if (n.type !== ce.AUDIO) { !this.audioOnly && n.type === ce.MAIN && !n.elementaryStreams.video && !n.elementaryStreams.audiovideo && (this.audioOnly = !0, this.mainFragLoading = null); return; } if (this.fragContextChanged(n)) { - this.warn(`Fragment ${n.sn}${r ? " p: " + r.index : ""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack ? this.switchingTrack.name : "false"}`); + this.warn(`Fragment ${n.sn}${i ? " p: " + i.index : ""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack ? this.switchingTrack.name : "false"}`); return; } if (Tt(n)) { @@ -31676,7 +31676,7 @@ class ax extends ed { const s = this.switchingTrack; s && (this.bufferedTrack = s, this.switchingTrack = null, this.hls.trigger(S.AUDIO_TRACK_SWITCHED, je({}, s))); } - this.fragBufferedComplete(n, r), this.media && this.tick(); + this.fragBufferedComplete(n, i), this.media && this.tick(); } onError(e, t) { var n; @@ -31732,7 +31732,7 @@ class ax extends ed { _handleTransmuxComplete(e) { var t; const n = "audio", { - hls: r + hls: i } = this, { remuxResult: s, chunkMeta: a @@ -31761,7 +31761,7 @@ class ax extends ed { const p = l.initSegment || l; if (this.unhandledEncryptionError(g, l)) return; - this._bufferInitSegment(c, g.tracks, p, a), r.trigger(S.FRAG_PARSING_INIT_SEGMENT, { + this._bufferInitSegment(c, g.tracks, p, a), i.trigger(S.FRAG_PARSING_INIT_SEGMENT, { frag: p, id: n, tracks: g.tracks @@ -31787,7 +31787,7 @@ class ax extends ed { frag: l, details: h }, m); - r.trigger(S.FRAG_PARSING_METADATA, p); + i.trigger(S.FRAG_PARSING_METADATA, p); } if (f) { const p = Qe({ @@ -31795,10 +31795,10 @@ class ax extends ed { frag: l, details: h }, f); - r.trigger(S.FRAG_PARSING_USERDATA, p); + i.trigger(S.FRAG_PARSING_USERDATA, p); } } - _bufferInitSegment(e, t, n, r) { + _bufferInitSegment(e, t, n, i) { if (this.state !== Q.PARSING || (t.video && delete t.video, t.audiovideo && delete t.audiovideo, !t.audio)) return; const s = t.audio; @@ -31811,7 +31811,7 @@ class ax extends ed { type: "audio", frag: n, part: null, - chunkMeta: r, + chunkMeta: i, parent: n.type, data: o }; @@ -31820,8 +31820,8 @@ class ax extends ed { this.tickImmediate(); } loadFragment(e, t, n) { - const r = this.fragmentTracker.getState(e); - if (this.switchingTrack || r === Ot.NOT_LOADED || r === Ot.PARTIAL) { + const i = this.fragmentTracker.getState(e); + if (this.switchingTrack || i === Ot.NOT_LOADED || i === Ot.PARTIAL) { var s; if (!Tt(e)) this._loadInitSegment(e, t); @@ -31839,19 +31839,19 @@ class ax extends ed { const { name: t, lang: n, - assocLang: r, + assocLang: i, characteristics: s, audioCodec: a, channels: o } = this.bufferedTrack; - Jr({ + Ji({ name: t, lang: n, - assocLang: r, + assocLang: i, characteristics: s, audioCodec: a, channels: o - }, e, zr) || (Hl(e.url, this.hls) ? (this.log("Switching audio track : flushing all audio"), super.flushMainBuffer(0, Number.POSITIVE_INFINITY, "audio"), this.bufferedTrack = null) : this.bufferedTrack = e); + }, e, zi) || (Hl(e.url, this.hls) ? (this.log("Switching audio track : flushing all audio"), super.flushMainBuffer(0, Number.POSITIVE_INFINITY, "audio"), this.bufferedTrack = null) : this.bufferedTrack = e); } } completeAudioSwitch(e) { @@ -31861,7 +31861,7 @@ class ax extends ed { this.flushAudioIfNeeded(e), this.bufferedTrack = e, this.switchingTrack = null, t.trigger(S.AUDIO_TRACK_SWITCHED, je({}, e)); } } -class ld extends ni { +class ld extends nr { constructor(e, t) { super(t, e.logger), this.hls = void 0, this.canLoad = !1, this.timer = -1, this.hls = e; } @@ -31878,11 +31878,11 @@ class ld extends ni { this.canLoad = !1, this.clearTimer(); } switchParams(e, t, n) { - const r = t == null ? void 0 : t.renditionReports; - if (r) { + const i = t == null ? void 0 : t.renditionReports; + if (i) { let s = -1; - for (let a = 0; a < r.length; a++) { - const o = r[a]; + for (let a = 0; a < i.length; a++) { + const o = i[a]; let l; try { l = new self.URL(o.URI, t.url).href; @@ -31895,7 +31895,7 @@ class ld extends ni { } else l === e.substring(0, l.length) && (s = a); } if (s !== -1) { - const a = r[s], o = parseInt(a["LAST-MSN"]) || t.lastPartSn; + const a = i[s], o = parseInt(a["LAST-MSN"]) || t.lastPartSn; let l = parseInt(a["LAST-PART"]) || t.lastPartIndex; if (this.hls.config.lowLatencyMode) { const c = Math.min(t.age - t.partTarget, t.targetduration); @@ -31926,22 +31926,22 @@ class ld extends ni { } playlistLoaded(e, t, n) { const { - details: r, + details: i, stats: s } = t, a = self.performance.now(), o = s.loading.first ? Math.max(0, a - s.loading.first) : 0; - r.advancedDateTime = Date.now() - o; + i.advancedDateTime = Date.now() - o; const l = this.hls.config.timelineOffset; - if (l !== r.appliedTimelineOffset) { + if (l !== i.appliedTimelineOffset) { const c = Math.max(l || 0, 0); - r.appliedTimelineOffset = c, r.fragments.forEach((h) => { + i.appliedTimelineOffset = c, i.fragments.forEach((h) => { h.setStart(h.playlistOffset + c); }); } - if (r.live || n != null && n.live) { + if (i.live || n != null && n.live) { const c = "levelInfo" in t ? t.levelInfo : t.track; - if (r.reloaded(n), n && r.fragments.length > 0) { - ZT(n, r, this); - const y = r.playlistParsingError; + if (i.reloaded(n), n && i.fragments.length > 0) { + ZT(n, i, this); + const y = i.playlistParsingError; if (y) { this.warn(y); const v = this.hls; @@ -31954,60 +31954,60 @@ class ld extends ni { type: fe.NETWORK_ERROR, details: G.LEVEL_PARSING_ERROR, fatal: !1, - url: r.url, + url: i.url, error: y, reason: y.message, level: t.level || void 0, - parent: (u = r.fragments[0]) == null ? void 0 : u.type, + parent: (u = i.fragments[0]) == null ? void 0 : u.type, networkDetails: T, stats: s }); return; } - r.playlistParsingError = null; + i.playlistParsingError = null; } } - r.requestScheduled === -1 && (r.requestScheduled = s.loading.start); - const h = this.hls.mainForwardBufferInfo, d = h ? h.end - h.len : 0, f = (r.edge - d) * 1e3, m = i2(r, f); - if (r.requestScheduled + m < a ? r.requestScheduled = a : r.requestScheduled += m, this.log(`live playlist ${e} ${r.advanced ? "REFRESHED " + r.lastPartSn + "-" + r.lastPartIndex : r.updated ? "UPDATED" : "MISSED"}`), !this.canLoad || !r.live) + i.requestScheduled === -1 && (i.requestScheduled = s.loading.start); + const h = this.hls.mainForwardBufferInfo, d = h ? h.end - h.len : 0, f = (i.edge - d) * 1e3, m = r2(i, f); + if (i.requestScheduled + m < a ? i.requestScheduled = a : i.requestScheduled += m, this.log(`live playlist ${e} ${i.advanced ? "REFRESHED " + i.lastPartSn + "-" + i.lastPartIndex : i.updated ? "UPDATED" : "MISSED"}`), !this.canLoad || !i.live) return; let g, p, b; - if (r.canBlockReload && r.endSN && r.advanced) { - const y = this.hls.config.lowLatencyMode, v = r.lastPartSn, T = r.endSN, A = r.lastPartIndex, w = A !== -1, D = v === T; - w ? D ? (p = T + 1, b = y ? 0 : A) : (p = v, b = y ? A + 1 : r.maxPartIndex) : p = T + 1; - const L = r.age, I = L + r.ageHeader; - let R = Math.min(I - r.partTarget, r.targetduration * 1.5); + if (i.canBlockReload && i.endSN && i.advanced) { + const y = this.hls.config.lowLatencyMode, v = i.lastPartSn, T = i.endSN, A = i.lastPartIndex, w = A !== -1, D = v === T; + w ? D ? (p = T + 1, b = y ? 0 : A) : (p = v, b = y ? A + 1 : i.maxPartIndex) : p = T + 1; + const L = i.age, I = L + i.ageHeader; + let R = Math.min(I - i.partTarget, i.targetduration * 1.5); if (R > 0) { - if (I > r.targetduration * 3) + if (I > i.targetduration * 3) this.log(`Playlist last advanced ${L.toFixed(2)}s ago. Omitting segment and part directives.`), p = void 0, b = void 0; - else if (n != null && n.tuneInGoal && I - r.partTarget > n.tuneInGoal) - this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${R} with playlist age: ${r.age}`), R = 0; + else if (n != null && n.tuneInGoal && I - i.partTarget > n.tuneInGoal) + this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${R} with playlist age: ${i.age}`), R = 0; else { - const M = Math.floor(R / r.targetduration); + const M = Math.floor(R / i.targetduration); if (p += M, b !== void 0) { - const P = Math.round(R % r.targetduration / r.partTarget); + const P = Math.round(R % i.targetduration / i.partTarget); b += P; } - this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${L.toFixed(2)}s goal: ${R} skip sn ${M} to part ${b}`); + this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${L.toFixed(2)}s goal: ${R} skip sn ${M} to part ${b}`); } - r.tuneInGoal = R; + i.tuneInGoal = R; } - if (g = this.getDeliveryDirectives(r, t.deliveryDirectives, p, b), y || !D) { - r.requestScheduled = a, this.loadingPlaylist(c, g); + if (g = this.getDeliveryDirectives(i, t.deliveryDirectives, p, b), y || !D) { + i.requestScheduled = a, this.loadingPlaylist(c, g); return; } - } else (r.canBlockReload || r.canSkipUntil) && (g = this.getDeliveryDirectives(r, t.deliveryDirectives, p, b)); - g && p !== void 0 && r.canBlockReload && (r.requestScheduled = s.loading.first + Math.max(m - o * 2, m / 2)), this.scheduleLoading(c, g, r); + } else (i.canBlockReload || i.canSkipUntil) && (g = this.getDeliveryDirectives(i, t.deliveryDirectives, p, b)); + g && p !== void 0 && i.canBlockReload && (i.requestScheduled = s.loading.first + Math.max(m - o * 2, m / 2)), this.scheduleLoading(c, g, i); } else this.clearTimer(); } scheduleLoading(e, t, n) { - const r = n || e.details; - if (!r) { + const i = n || e.details; + if (!i) { this.loadingPlaylist(e, t); return; } - const s = self.performance.now(), a = r.requestScheduled; + const s = self.performance.now(), a = i.requestScheduled; if (s >= a) { this.loadingPlaylist(e, t); return; @@ -32015,16 +32015,16 @@ class ld extends ni { const o = a - s; this.log(`reload live playlist ${e.name || e.bitrate + "bps"} in ${Math.round(o)} ms`), this.clearTimer(), this.timer = self.setTimeout(() => this.loadingPlaylist(e, t), o); } - getDeliveryDirectives(e, t, n, r) { + getDeliveryDirectives(e, t, n, i) { let s = zm(e); - return t != null && t.skip && e.deltaUpdateFailed && (n = t.msn, r = t.part, s = ll.No), new qm(n, r, s); + return t != null && t.skip && e.deltaUpdateFailed && (n = t.msn, i = t.part, s = ll.No), new qm(n, i, s); } checkRetry(e) { - const t = e.details, n = Gl(e), r = e.errorAction, { + const t = e.details, n = Gl(e), i = e.errorAction, { action: s, retryCount: a = 0, retryConfig: o - } = r || {}, l = !!r && !!o && (s === Vt.RetryRequest || !r.resolved && s === Vt.SendAlternateToPenaltyBox); + } = i || {}, l = !!i && !!o && (s === Vt.RetryRequest || !i.resolved && s === Vt.SendAlternateToPenaltyBox); if (l) { var u; if (a >= o.maxNumRetry) @@ -32035,25 +32035,25 @@ class ld extends ni { const c = Yh(o, a); this.clearTimer(), this.timer = self.setTimeout(() => this.loadPlaylist(), c), this.warn(`Retrying playlist loading ${a + 1}/${o.maxNumRetry} after "${t}" in ${c}ms`); } - e.levelRetry = !0, r.resolved = !0; + e.levelRetry = !0, i.resolved = !0; } return l; } } -function I2(i, e) { - if (i.length !== e.length) +function I2(r, e) { + if (r.length !== e.length) return !1; - for (let t = 0; t < i.length; t++) - if (!Xa(i[t].attrs, e[t].attrs)) + for (let t = 0; t < r.length; t++) + if (!Xa(r[t].attrs, e[t].attrs)) return !1; return !0; } -function Xa(i, e, t) { - const n = i["STABLE-RENDITION-ID"]; - return n && !t ? n === e["STABLE-RENDITION-ID"] : !(t || ["LANGUAGE", "NAME", "CHARACTERISTICS", "AUTOSELECT", "DEFAULT", "FORCED", "ASSOC-LANGUAGE"]).some((r) => i[r] !== e[r]); +function Xa(r, e, t) { + const n = r["STABLE-RENDITION-ID"]; + return n && !t ? n === e["STABLE-RENDITION-ID"] : !(t || ["LANGUAGE", "NAME", "CHARACTERISTICS", "AUTOSELECT", "DEFAULT", "FORCED", "ASSOC-LANGUAGE"]).some((i) => r[i] !== e[i]); } -function qc(i, e) { - return e.label.toLowerCase() === i.name.toLowerCase() && (!e.language || e.language.toLowerCase() === (i.lang || "").toLowerCase()); +function qc(r, e) { + return e.label.toLowerCase() === r.name.toLowerCase() && (!e.language || e.language.toLowerCase() === (r.lang || "").toLowerCase()); } class ox extends ld { constructor(e) { @@ -32083,15 +32083,15 @@ class ox extends ld { onAudioTrackLoaded(e, t) { const { id: n, - groupId: r, + groupId: i, details: s } = t, a = this.tracksInGroup[n]; - if (!a || a.groupId !== r) { - this.warn(`Audio track with id:${n} and group:${r} not found in active group ${a == null ? void 0 : a.groupId}`); + if (!a || a.groupId !== i) { + this.warn(`Audio track with id:${n} and group:${i} not found in active group ${a == null ? void 0 : a.groupId}`); return; } const o = a.details; - a.details = t.details, this.log(`Audio track ${n} "${a.name}" lang:${a.lang} group:${r} loaded [${s.startSN}-${s.endSN}]`), n === this.trackId && this.playlistLoaded(n, t, o); + a.details = t.details, this.log(`Audio track ${n} "${a.name}" lang:${a.lang} group:${i} loaded [${s.startSN}-${s.endSN}]`), n === this.trackId && this.playlistLoaded(n, t, o); } onLevelLoading(e, t) { this.switchLevel(t.level); @@ -32103,9 +32103,9 @@ class ox extends ld { const t = this.hls.levels[e]; if (!t) return; - const n = t.audioGroups || null, r = this.groupIds; + const n = t.audioGroups || null, i = this.groupIds; let s = this.currentTrack; - if (!n || (r == null ? void 0 : r.length) !== (n == null ? void 0 : n.length) || n != null && n.some((o) => (r == null ? void 0 : r.indexOf(o)) === -1)) { + if (!n || (i == null ? void 0 : i.length) !== (n == null ? void 0 : n.length) || n != null && n.some((o) => (i == null ? void 0 : i.indexOf(o)) === -1)) { this.groupIds = n, this.trackId = -1, this.currentTrack = null; const o = this.tracks.filter((d) => !n || n.indexOf(d.groupId) !== -1); if (o.length) @@ -32117,11 +32117,11 @@ class ox extends ld { this.tracksInGroup = o; const l = this.hls.config.audioPreference; if (!s && l) { - const d = Fi(l, o, zr); + const d = Fr(l, o, zi); if (d > -1) s = o[d]; else { - const f = Fi(l, this.tracks); + const f = Fr(l, this.tracks); s = this.tracks[f]; } } @@ -32166,23 +32166,23 @@ class ox extends ld { if (t.config.audioPreference = e, e) { const n = this.allAudioTracks; if (this.selectDefaultTrack = !1, n.length) { - const r = this.currentTrack; - if (r && Jr(e, r, zr)) - return r; - const s = Fi(e, this.tracksInGroup, zr); + const i = this.currentTrack; + if (i && Ji(e, i, zi)) + return i; + const s = Fr(e, this.tracksInGroup, zi); if (s > -1) { const a = this.tracksInGroup[s]; return this.setAudioTrack(s), a; - } else if (r) { + } else if (i) { let a = t.loadLevel; a === -1 && (a = t.firstAutoLevel); - const o = yT(e, t.levels, n, a, zr); + const o = yT(e, t.levels, n, a, zi); if (o === -1) return null; t.nextLoadLevel = o; } if (e.channels || e.audioCodec) { - const a = Fi(e, n); + const a = Fr(e, n); if (a > -1) return n[a]; } @@ -32197,23 +32197,23 @@ class ox extends ld { return; } this.selectDefaultTrack = !1; - const n = this.currentTrack, r = t[e], s = r.details && !r.details.live; - if (e === this.trackId && r === n && s || (this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`), this.trackId = e, this.currentTrack = r, this.hls.trigger(S.AUDIO_TRACK_SWITCHING, je({}, r)), s)) + const n = this.currentTrack, i = t[e], s = i.details && !i.details.live; + if (e === this.trackId && i === n && s || (this.log(`Switching to audio-track ${e} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`), this.trackId = e, this.currentTrack = i, this.hls.trigger(S.AUDIO_TRACK_SWITCHING, je({}, i)), s)) return; - const a = this.switchParams(r.url, n == null ? void 0 : n.details, r.details); + const a = this.switchParams(i.url, n == null ? void 0 : n.details, i.details); this.loadPlaylist(a); } findTrackId(e) { const t = this.tracksInGroup; for (let n = 0; n < t.length; n++) { - const r = t[n]; - if (!(this.selectDefaultTrack && !r.default) && (!e || Jr(e, r, zr))) + const i = t[n]; + if (!(this.selectDefaultTrack && !i.default) && (!e || Ji(e, i, zi))) return n; } if (e) { const { name: n, - lang: r, + lang: i, assocLang: s, characteristics: a, audioCodec: o, @@ -32221,14 +32221,14 @@ class ox extends ld { } = e; for (let u = 0; u < t.length; u++) { const c = t[u]; - if (Jr({ + if (Ji({ name: n, - lang: r, + lang: i, assocLang: s, characteristics: a, audioCodec: o, channels: l - }, c, zr)) + }, c, zi)) return u; } for (let u = 0; u < t.length; u++) { @@ -32251,11 +32251,11 @@ class ox extends ld { } loadingPlaylist(e, t) { super.loadingPlaylist(e, t); - const n = e.id, r = e.groupId, s = this.getUrlWithDirectives(e.url, t), a = e.details, o = a == null ? void 0 : a.age; - this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t == null ? void 0 : t.msn) !== void 0 ? " at sn " + t.msn + " part " + t.part : ""}${o && a.live ? " age " + o.toFixed(1) + (a.type && " " + a.type || "") : ""} ${s}`), this.hls.trigger(S.AUDIO_TRACK_LOADING, { + const n = e.id, i = e.groupId, s = this.getUrlWithDirectives(e.url, t), a = e.details, o = a == null ? void 0 : a.age; + this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${i}${(t == null ? void 0 : t.msn) !== void 0 ? " at sn " + t.msn + " part " + t.part : ""}${o && a.live ? " age " + o.toFixed(1) + (a.type && " " + a.type || "") : ""} ${s}`), this.hls.trigger(S.AUDIO_TRACK_LOADING, { url: s, id: n, - groupId: r, + groupId: i, deliveryDirectives: t || null, track: e }); @@ -32275,8 +32275,8 @@ class lx { append(e, t, n) { if (this.queues === null || this.tracks === null) return; - const r = this.queues[t]; - r.push(e), r.length === 1 && !n && this.executeNext(t); + const i = this.queues[t]; + i.push(e), i.length === 1 && !n && this.executeNext(t); } appendBlocker(e) { return new Promise((t) => { @@ -32327,12 +32327,12 @@ class lx { return; const t = this.queues[e]; if (t.length) { - const r = t[0]; + const i = t[0]; try { - r.execute(); + i.execute(); } catch (s) { var n; - if (r.onError(s), this.queues === null || this.tracks === null) + if (i.onError(s), this.queues === null || this.tracks === null) return; const a = (n = this.tracks[e]) == null ? void 0 : n.buffer; a != null && a.updating || this.shiftAndExecuteNext(e); @@ -32362,8 +32362,8 @@ ${this.list("audiovideo")}}`; } listSbInfo(e) { var t; - const n = (t = this.tracks) == null ? void 0 : t[e], r = n == null ? void 0 : n.buffer; - return r ? `SourceBuffer${r.updating ? " updating" : ""}${n.ended ? " ended" : ""}${n.ending ? " ending" : ""}` : "none"; + const n = (t = this.tracks) == null ? void 0 : t[e], i = n == null ? void 0 : n.buffer; + return i ? `SourceBuffer${i.updating ? " updating" : ""}${n.ended ? " ended" : ""}${n.ending ? " ending" : ""}` : "none"; } listOps(e) { var t; @@ -32376,24 +32376,24 @@ class ux extends Error { super(e), this.name = L2; } } -class cx extends ni { +class cx extends nr { constructor(e, t) { super("buffer-controller", e.logger), this.hls = void 0, this.fragmentTracker = void 0, this.details = null, this._objectUrl = null, this.operationQueue = null, this.bufferCodecEventsTotal = 0, this.media = null, this.mediaSource = null, this.lastMpegAudioChunk = null, this.blockedAudioAppend = null, this.lastVideoAppendEnd = 0, this.appendSource = void 0, this.transferData = void 0, this.overrides = void 0, this.appendErrors = { audio: 0, video: 0, audiovideo: 0 }, this.tracks = {}, this.sourceBuffers = [[null, null], [null, null]], this._onEndStreaming = (n) => { - var r; - this.hls && ((r = this.mediaSource) == null ? void 0 : r.readyState) === "open" && this.hls.pauseBuffering(); + var i; + this.hls && ((i = this.mediaSource) == null ? void 0 : i.readyState) === "open" && this.hls.pauseBuffering(); }, this._onStartStreaming = (n) => { this.hls && this.hls.resumeBuffering(); }, this._onMediaSourceOpen = (n) => { const { - media: r, + media: i, mediaSource: s } = this; - n && this.log("Media source opened"), !(!r || !s) && (s.removeEventListener("sourceopen", this._onMediaSourceOpen), r.removeEventListener("emptied", this._onMediaEmptied), this.updateDuration(), this.hls.trigger(S.MEDIA_ATTACHED, { - media: r, + n && this.log("Media source opened"), !(!i || !s) && (s.removeEventListener("sourceopen", this._onMediaSourceOpen), i.removeEventListener("emptied", this._onMediaEmptied), this.updateDuration(), this.hls.trigger(S.MEDIA_ATTACHED, { + media: i, mediaSource: s }), this.mediaSource !== null && this.checkPendingTracks()); }, this._onMediaSourceClose = () => { @@ -32403,10 +32403,10 @@ class cx extends ni { }, this._onMediaEmptied = () => { const { mediaSrc: n, - _objectUrl: r + _objectUrl: i } = this; - n !== r && this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`); - }, this.hls = e, this.fragmentTracker = t, this.appendSource = CS(kr(e.config.preferManagedMediaSource)), this.initTracks(), this.registerListeners(); + n !== i && this.error(`Media element src was set while attaching MediaSource (${i} > ${n})`); + }, this.hls = e, this.fragmentTracker = t, this.appendSource = CS(ki(e.config.preferManagedMediaSource)), this.initTracks(), this.registerListeners(); } hasSourceTypes() { return Object.keys(this.tracks).length > 0; @@ -32440,8 +32440,8 @@ class cx extends ni { const a = this.isQueued(); (s || a) && this.warn(`Transfering MediaSource with${a ? " operations in queue" : ""}${s ? " updating SourceBuffer(s)" : ""} ${this.operationQueue}`), this.operationQueue.destroy(); } - const r = this.transferData; - return !this.sourceBufferCount && r && r.mediaSource === t ? Qe(n, r.tracks) : this.sourceBuffers.forEach((s) => { + const i = this.transferData; + return !this.sourceBufferCount && i && i.mediaSource === t ? Qe(n, i.tracks) : this.sourceBuffers.forEach((s) => { const [a] = s; a && (n[a] = Qe({}, this.tracks[a]), this.removeBuffer(a)), s[0] = s[1] = null; }), { @@ -32459,17 +32459,17 @@ class cx extends ni { } onManifestParsed(e, t) { var n; - let r = 2; - (t.audio && !t.video || !t.altAudio) && (r = 1), this.bufferCodecEventsTotal = r, this.log(`${r} bufferCodec event(s) expected.`), (n = this.transferData) != null && n.mediaSource && this.sourceBufferCount && r && this.bufferCreated(); + let i = 2; + (t.audio && !t.video || !t.altAudio) && (i = 1), this.bufferCodecEventsTotal = i, this.log(`${i} bufferCodec event(s) expected.`), (n = this.transferData) != null && n.mediaSource && this.sourceBufferCount && i && this.bufferCreated(); } onMediaAttaching(e, t) { const n = this.media = t.media; this.transferData = this.overrides = void 0; - const r = kr(this.appendSource); - if (r) { + const i = ki(this.appendSource); + if (i) { const s = !!t.mediaSource; (s || t.overrides) && (this.transferData = t, this.overrides = t.overrides); - const a = this.mediaSource = t.mediaSource || new r(); + const a = this.mediaSource = t.mediaSource || new i(); if (this.assignMediaSource(a), s) this._objectUrl = n.src, this.attachTransferred(); else { @@ -32496,30 +32496,30 @@ class cx extends ni { const e = this.media, t = this.transferData; if (!t || !e) return; - const n = this.tracks, r = t.tracks, s = r ? Object.keys(r) : null, a = s ? s.length : 0, o = () => { + const n = this.tracks, i = t.tracks, s = i ? Object.keys(i) : null, a = s ? s.length : 0, o = () => { Promise.resolve().then(() => { this.media && this.mediaSourceOpenOrEnded && this._onMediaSourceOpen(); }); }; - if (r && s && a) { + if (i && s && a) { if (!this.tracksReady) { this.hls.config.startFragPrefetch = !0, this.log("attachTransferred: waiting for SourceBuffer track info"); return; } if (this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal}) required tracks: ${et(n, (l, u) => l === "initSegment" ? void 0 : u)}; -transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, n)) { +transfer tracks: ${et(i, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(i, n)) { t.mediaSource = null, t.tracks = void 0; const l = e.currentTime, u = this.details, c = Math.max(l, (u == null ? void 0 : u.fragments[0].start) || 0); if (c - l > 1) { this.log(`attachTransferred: waiting for playback to reach new tracks start time ${l} -> ${c}`); return; } - this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${c} currentTime: ${l}`), this.onMediaDetaching(S.MEDIA_DETACHING, {}), this.onMediaAttaching(S.MEDIA_ATTACHING, t), e.currentTime = c; + this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(i)}"->"${Object.keys(n)}") start time: ${c} currentTime: ${l}`), this.onMediaDetaching(S.MEDIA_DETACHING, {}), this.onMediaAttaching(S.MEDIA_ATTACHING, t), e.currentTime = c; return; } this.transferData = void 0, s.forEach((l) => { - const u = l, c = r[u]; + const u = l, c = i[u]; if (c) { const h = c.buffer; if (h) { @@ -32545,7 +32545,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, const n = !!t.transferMedia; this.transferData = this.overrides = void 0; const { - media: r, + media: i, mediaSource: s, _objectUrl: a } = this; @@ -32570,7 +32570,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } s.removeEventListener("sourceopen", this._onMediaSourceOpen), s.removeEventListener("sourceended", this._onMediaSourceEnded), s.removeEventListener("sourceclose", this._onMediaSourceClose), this.appendSource && (s.removeEventListener("startstreaming", this._onStartStreaming), s.removeEventListener("endstreaming", this._onEndStreaming)), this.mediaSource = null, this._objectUrl = null; } - r && (r.removeEventListener("emptied", this._onMediaEmptied), n || (a && self.URL.revokeObjectURL(a), this.mediaSrc === a ? (r.removeAttribute("src"), this.appendSource && L1(r), r.load()) : this.warn("media|source.src was changed by a third party - skip cleanup")), this.media = null), this.hls.trigger(S.MEDIA_DETACHED, t); + i && (i.removeEventListener("emptied", this._onMediaEmptied), n || (a && self.URL.revokeObjectURL(a), this.mediaSrc === a ? (i.removeAttribute("src"), this.appendSource && L1(i), i.load()) : this.warn("media|source.src was changed by a third party - skip cleanup")), this.media = null), this.hls.trigger(S.MEDIA_DETACHED, t); } onBufferReset() { this.sourceBuffers.forEach(([e]) => { @@ -32582,8 +32582,8 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, const n = (t = this.tracks[e]) == null ? void 0 : t.buffer; if (this.removeBuffer(e), n) try { - var r; - (r = this.mediaSource) != null && r.sourceBuffers.length && this.mediaSource.removeSourceBuffer(n); + var i; + (i = this.mediaSource) != null && i.sourceBuffers.length && this.mediaSource.removeSourceBuffer(n); } catch (s) { this.warn(`onBufferReset ${e}`, s); } @@ -32599,11 +32599,11 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } onBufferCodecs(e, t) { var n; - const r = this.tracks, s = Object.keys(t); + const i = this.tracks, s = Object.keys(t); this.log(`BUFFER_CODECS: "${s}" (current SB count ${this.sourceBufferCount})`); - const a = "audiovideo" in t && (r.audio || r.video) || r.audiovideo && ("audio" in t || "video" in t), o = !a && this.sourceBufferCount && this.media && s.some((l) => !r[l]); + const a = "audiovideo" in t && (i.audio || i.video) || i.audiovideo && ("audio" in t || "video" in t), o = !a && this.sourceBufferCount && this.media && s.some((l) => !i[l]); if (a || o) { - this.warn(`Unsupported transition between "${Object.keys(r)}" and "${s}" SourceBuffers`); + this.warn(`Unsupported transition between "${Object.keys(i)}" and "${s}" SourceBuffers`); return; } s.forEach((l) => { @@ -32616,9 +32616,9 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, metadata: p, supplemental: b } = h; - let y = r[l]; + let y = i[l]; const v = (u = this.transferData) == null || (u = u.tracks) == null ? void 0 : u[l], T = v != null && v.buffer ? v : y, A = (T == null ? void 0 : T.pendingCodec) || (T == null ? void 0 : T.codec), w = T == null ? void 0 : T.levelCodec; - y || (y = r[l] = { + y || (y = i[l] = { buffer: void 0, listeners: [], codec: f, @@ -32646,13 +32646,13 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, }, {}); } appendChangeType(e, t, n) { - const r = `${t};codecs=${n}`, s = { - label: `change-type=${r}`, + const i = `${t};codecs=${n}`, s = { + label: `change-type=${i}`, execute: () => { const a = this.tracks[e]; if (a) { const o = a.buffer; - o != null && o.changeType && (this.log(`changing ${e} sourceBuffer type to ${r}`), o.changeType(r), a.codec = n, a.container = t); + o != null && o.changeType && (this.log(`changing ${e} sourceBuffer type to ${i}`), o.changeType(i), a.codec = n, a.container = t); } this.shiftAndExecuteNext(e); }, @@ -32668,7 +32668,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } blockAudio(e) { var t; - const n = e.start, r = n + e.duration * 0.05; + const n = e.start, i = n + e.duration * 0.05; if (((t = this.fragmentTracker.getAppendedFrag(n, ce.MAIN)) == null ? void 0 : t.gap) === !0) return; const a = { @@ -32676,7 +32676,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, execute: () => { var o; const l = this.tracks.video; - (this.lastVideoAppendEnd > r || l != null && l.buffer && De.isBuffered(l.buffer, r) || ((o = this.fragmentTracker.getAppendedFrag(r, ce.MAIN)) == null ? void 0 : o.gap) === !0) && (this.blockedAudioAppend = null, this.shiftAndExecuteNext("audio")); + (this.lastVideoAppendEnd > i || l != null && l.buffer && De.isBuffered(l.buffer, i) || ((o = this.fragmentTracker.getAppendedFrag(i, ce.MAIN)) == null ? void 0 : o.gap) === !0) && (this.blockedAudioAppend = null, this.shiftAndExecuteNext("audio")); }, onStart: () => { }, @@ -32702,7 +32702,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, const { tracks: n } = this, { - data: r, + data: i, type: s, parent: a, frag: o, @@ -32740,7 +32740,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, var D; h.executeStart = self.performance.now(); const L = (D = this.tracks[s]) == null ? void 0 : D.buffer; - L && (y ? this.updateTimestampOffset(L, A, 0.1, s, d, f) : c !== void 0 && oe(c) && this.updateTimestampOffset(L, c, 1e-6, s, d, f)), this.appendExecutor(r, s); + L && (y ? this.updateTimestampOffset(L, A, 0.1, s, d, f) : c !== void 0 && oe(c) && this.updateTimestampOffset(L, c, 1e-6, s, d, f)), this.appendExecutor(i, s); }, onStart: () => { }, @@ -32801,34 +32801,34 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, type: e }); }, - onError: (r) => { - this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`, r); + onError: (i) => { + this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`, i); } }; } onBufferFlushing(e, t) { const { type: n, - startOffset: r, + startOffset: i, endOffset: s } = t; - n ? this.append(this.getFlushOp(n, r, s), n) : this.sourceBuffers.forEach(([a]) => { - a && this.append(this.getFlushOp(a, r, s), a); + n ? this.append(this.getFlushOp(n, i, s), n) : this.sourceBuffers.forEach(([a]) => { + a && this.append(this.getFlushOp(a, i, s), a); }); } onFragParsed(e, t) { const { frag: n, - part: r - } = t, s = [], a = r ? r.elementaryStreams : n.elementaryStreams; + part: i + } = t, s = [], a = i ? i.elementaryStreams : n.elementaryStreams; a[Je.AUDIOVIDEO] ? s.push("audiovideo") : (a[Je.AUDIO] && s.push("audio"), a[Je.VIDEO] && s.push("video")); const o = () => { const l = self.performance.now(); - n.stats.buffering.end = l, r && (r.stats.buffering.end = l); - const u = r ? r.stats : n.stats; + n.stats.buffering.end = l, i && (i.stats.buffering.end = l); + const u = i ? i.stats : n.stats; this.hls.trigger(S.FRAG_BUFFERED, { frag: n, - part: r, + part: i, stats: u, id: n.type }); @@ -32860,11 +32860,11 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, (!t.type || t.type === a) && (o.ending = !0, o.ended || (o.ended = !0, this.log(`${a} buffer reached EOS`))); } }); - const r = ((n = this.overrides) == null ? void 0 : n.endOfStream) !== !1; + const i = ((n = this.overrides) == null ? void 0 : n.endOfStream) !== !1; this.sourceBufferCount > 0 && !this.sourceBuffers.some(([a]) => { var o; return a && !((o = this.tracks[a]) != null && o.ended); - }) ? r ? (this.log("Queueing EOS"), this.blockUntilOpen(() => { + }) ? i ? (this.log("Queueing EOS"), this.blockUntilOpen(() => { this.tracksEnded(); const { mediaSource: a @@ -32898,8 +32898,8 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, onError(e, t) { if (t.details === G.BUFFER_APPEND_ERROR && t.frag) { var n; - const r = (n = t.errorAction) == null ? void 0 : n.nextAutoLevel; - oe(r) && r !== t.frag.level && this.resetAppendErrors(); + const i = (n = t.errorAction) == null ? void 0 : n.nextAutoLevel; + oe(i) && i !== t.frag.level && this.resetAppendErrors(); } } resetAppendErrors() { @@ -32917,19 +32917,19 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } = this; if (!n || t === null || !this.sourceBufferCount) return; - const r = e.config, s = n.currentTime, a = t.levelTargetDuration, o = t.live && r.liveBackBufferLength !== null ? r.liveBackBufferLength : r.backBufferLength; + const i = e.config, s = n.currentTime, a = t.levelTargetDuration, o = t.live && i.liveBackBufferLength !== null ? i.liveBackBufferLength : i.backBufferLength; if (oe(o) && o >= 0) { const u = Math.max(o, a), c = Math.floor(s / a) * a - u; this.flushBackBuffer(s, a, c); } - const l = r.frontBufferFlushThreshold; + const l = i.frontBufferFlushThreshold; if (oe(l) && l > 0) { - const u = Math.max(r.maxBufferLength, l), c = Math.max(u, a), h = Math.floor(s / a) * a + c; + const u = Math.max(i.maxBufferLength, l), c = Math.max(u, a), h = Math.floor(s / a) * a + c; this.flushFrontBuffer(s, a, h); } } flushBackBuffer(e, t, n) { - this.sourceBuffers.forEach(([r, s]) => { + this.sourceBuffers.forEach(([i, s]) => { if (s) { const o = De.getBuffered(s); if (o.length > 0 && n > o.start(0)) { @@ -32937,26 +32937,26 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, this.hls.trigger(S.BACK_BUFFER_REACHED, { bufferEnd: n }); - const l = this.tracks[r]; + const l = this.tracks[i]; if ((a = this.details) != null && a.live) this.hls.trigger(S.LIVE_BACK_BUFFER_REACHED, { bufferEnd: n }); else if (l != null && l.ended) { - this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`); + this.log(`Cannot flush ${i} back buffer while SourceBuffer is in ended state`); return; } this.hls.trigger(S.BUFFER_FLUSHING, { startOffset: 0, endOffset: n, - type: r + type: i }); } } }); } flushFrontBuffer(e, t, n) { - this.sourceBuffers.forEach(([r, s]) => { + this.sourceBuffers.forEach(([i, s]) => { if (s) { const a = De.getBuffered(s), o = a.length; if (o < 2) @@ -32967,7 +32967,7 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, this.hls.trigger(S.BUFFER_FLUSHING, { startOffset: l, endOffset: 1 / 0, - type: r + type: i }); } }); @@ -32985,10 +32985,10 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } = this; if (!t || !this.media || (n == null ? void 0 : n.readyState) !== "open") return null; - const r = t.edge; + const i = t.edge; if (t.live && this.hls.config.liveDurationInfinity) { if (t.fragments.length && n.setLiveSeekableRange) { - const u = Math.max(0, t.fragmentStart), c = Math.max(u, r); + const u = Math.max(0, t.fragmentStart), c = Math.max(u, i); return { duration: 1 / 0, start: u, @@ -33005,8 +33005,8 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, duration: s } : null; const a = this.media.duration, o = oe(n.duration) ? n.duration : 0; - return r > o && r > a || !oe(a) ? { - duration: r + return i > o && i > a || !oe(a) ? { + duration: i } : null; } updateMediaSource({ @@ -33014,8 +33014,8 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, start: t, end: n }) { - const r = this.mediaSource; - !this.media || !r || r.readyState !== "open" || (r.duration !== e && (oe(e) && this.log(`Updating MediaSource duration to ${e.toFixed(3)}`), r.duration = e), t !== void 0 && n !== void 0 && (this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`), r.setLiveSeekableRange(t, n))); + const i = this.mediaSource; + !this.media || !i || i.readyState !== "open" || (i.duration !== e && (oe(e) && this.log(`Updating MediaSource duration to ${e.toFixed(3)}`), i.duration = e), t !== void 0 && n !== void 0 && (this.log(`MediaSource duration is set to ${i.duration}. Setting seekable range to ${t}-${n}.`), i.setLiveSeekableRange(t, n))); } get tracksReady() { const e = this.pendingTrackCount; @@ -33028,8 +33028,8 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, tracks: n } = this; if (this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${et(n)}`), this.tracksReady) { - var r; - const s = (r = this.transferData) == null ? void 0 : r.tracks; + var i; + const s = (i = this.transferData) == null ? void 0 : i.tracks; s && Object.keys(s).length ? this.attachTransferred() : this.createSourceBuffers(); } } @@ -33038,15 +33038,15 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, const e = {}; this.sourceBuffers.forEach(([t, n]) => { if (t) { - const r = this.tracks[t]; + const i = this.tracks[t]; e[t] = { buffer: n, - container: r.container, - codec: r.codec, - supplemental: r.supplemental, - levelCodec: r.levelCodec, - id: r.id, - metadata: r.metadata + container: i.container, + codec: i.codec, + supplemental: i.supplemental, + levelCodec: i.levelCodec, + id: i.id, + metadata: i.metadata }; } }), this.hls.trigger(S.BUFFER_CREATED, { @@ -33082,8 +33082,8 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, const c = n.addSourceBuffer(u), h = Uu(a), d = [a, c]; t[h] = d, o.buffer = c; } catch (c) { - var r; - this.error(`error while trying to add sourceBuffer: ${c.message}`), this.shiftAndExecuteNext(a), (r = this.operationQueue) == null || r.removeBlockers(), delete this.tracks[a], this.hls.trigger(S.ERROR, { + var i; + this.error(`error while trying to add sourceBuffer: ${c.message}`), this.shiftAndExecuteNext(a), (i = this.operationQueue) == null || i.removeBlockers(), delete this.tracks[a], this.hls.trigger(S.ERROR, { type: fe.MEDIA_ERROR, details: G.BUFFER_ADD_CODEC_ERROR, fatal: !1, @@ -33101,19 +33101,19 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } getTrackCodec(e, t) { const n = e.supplemental; - let r = e.codec; - n && (t === "video" || t === "audiovideo") && qa(n, "video") && (r = eT(r, n)); - const s = ol(r, e.levelCodec); + let i = e.codec; + n && (t === "video" || t === "audiovideo") && qa(n, "video") && (i = eT(i, n)); + const s = ol(i, e.levelCodec); return s ? t.slice(0, 5) === "audio" ? $l(s, this.appendSource) : s : ""; } trackSourceBuffer(e, t) { const n = t.buffer; if (!n) return; - const r = this.getTrackCodec(t, e); + const i = this.getTrackCodec(t, e); this.tracks[e] = { buffer: n, - codec: r, + codec: i, container: t.container, levelCodec: t.levelCodec, supplemental: t.supplemental, @@ -33147,40 +33147,40 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, } onSBUpdateError(e, t) { var n; - const r = new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n = this.mediaSource) == null ? void 0 : n.readyState}`); - this.error(`${r}`, t), this.hls.trigger(S.ERROR, { + const i = new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n = this.mediaSource) == null ? void 0 : n.readyState}`); + this.error(`${i}`, t), this.hls.trigger(S.ERROR, { type: fe.MEDIA_ERROR, details: G.BUFFER_APPENDING_ERROR, sourceBufferName: e, - error: r, + error: i, fatal: !1 }); const s = this.currentOp(e); - s && s.onError(r); + s && s.onError(i); } - updateTimestampOffset(e, t, n, r, s, a) { + updateTimestampOffset(e, t, n, i, s, a) { const o = t - e.timestampOffset; - Math.abs(o) >= n && (this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${s} cc: ${a})`), e.timestampOffset = t); + Math.abs(o) >= n && (this.log(`Updating ${i} SourceBuffer timestampOffset to ${t} (sn: ${s} cc: ${a})`), e.timestampOffset = t); } // This method must result in an updateend event; if remove is not called, onSBUpdateEnd must be called manually removeExecutor(e, t, n) { const { - media: r, + media: i, mediaSource: s } = this, a = this.tracks[e], o = a == null ? void 0 : a.buffer; - if (!r || !s || !o) { + if (!i || !s || !o) { this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`), this.shiftAndExecuteNext(e); return; } - const l = oe(r.duration) ? r.duration : 1 / 0, u = oe(s.duration) ? s.duration : 1 / 0, c = Math.max(0, t), h = Math.min(n, l, u); + const l = oe(i.duration) ? i.duration : 1 / 0, u = oe(s.duration) ? s.duration : 1 / 0, c = Math.max(0, t), h = Math.min(n, l, u); h > c && (!a.ending || a.ended) ? (a.ended = !1, this.log(`Removing [${c},${h}] from the ${e} SourceBuffer`), o.remove(c, h)) : this.shiftAndExecuteNext(e); } // This method must result in an updateend event; if append is not called, onSBUpdateEnd must be called manually appendExecutor(e, t) { - const n = this.tracks[t], r = n == null ? void 0 : n.buffer; - if (!r) + const n = this.tracks[t], i = n == null ? void 0 : n.buffer; + if (!i) throw new ux(`Attempting to append to the ${t} SourceBuffer, but it does not exist`); - n.ending = !1, n.ended = !1, r.appendBuffer(e); + n.ending = !1, n.ended = !1, i.appendBuffer(e); } blockUntilOpen(e) { if (this.isUpdating() || this.isQueued()) @@ -33211,16 +33211,16 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, return this.log("Blocking operation requested, but no SourceBuffers exist"), Promise.resolve().then(e); const { operationQueue: n - } = this, r = t.map((a) => this.appendBlocker(a)); - return t.length > 1 && !!this.blockedAudioAppend && this.unblockAudio(), Promise.all(r).then((a) => { + } = this, i = t.map((a) => this.appendBlocker(a)); + return t.length > 1 && !!this.blockedAudioAppend && this.unblockAudio(), Promise.all(i).then((a) => { n === this.operationQueue && (e(), this.stepOperationQueue(this.sourceBufferTypes)); }); } stepOperationQueue(e) { e.forEach((t) => { var n; - const r = (n = this.tracks[t]) == null ? void 0 : n.buffer; - !r || r.updating || this.shiftAndExecuteNext(t); + const i = (n = this.tracks[t]) == null ? void 0 : n.buffer; + !i || i.updating || this.shiftAndExecuteNext(t); }); } append(e, t, n) { @@ -33249,14 +33249,14 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, return this.sourceBuffers.map(([e]) => e).filter((e) => !!e); } addBufferListener(e, t, n) { - const r = this.tracks[e]; - if (!r) + const i = this.tracks[e]; + if (!i) return; - const s = r.buffer; + const s = i.buffer; if (!s) return; const a = n.bind(this, e); - r.listeners.push({ + i.listeners.push({ event: t, listener: a }), s.addEventListener(t, a); @@ -33266,23 +33266,23 @@ transfer tracks: ${et(r, (l, u) => l === "initSegment" ? void 0 : u)}}`), !wv(r, if (!t) return; const n = t.buffer; - n && (t.listeners.forEach((r) => { - n.removeEventListener(r.event, r.listener); + n && (t.listeners.forEach((i) => { + n.removeEventListener(i.event, i.listener); }), t.listeners.length = 0); } } -function L1(i) { - const e = i.querySelectorAll("source"); +function L1(r) { + const e = r.querySelectorAll("source"); [].slice.call(e).forEach((t) => { - i.removeChild(t); + r.removeChild(t); }); } -function hx(i, e) { +function hx(r, e) { const t = self.document.createElement("source"); - t.type = "video/mp4", t.src = e, i.appendChild(t); + t.type = "video/mp4", t.src = e, r.appendChild(t); } -function Uu(i) { - return i === "audio" ? 1 : 0; +function Uu(r) { + return r === "audio" ? 1 : 0; } class ud { constructor(e) { @@ -33352,7 +33352,7 @@ class ud { const t = this.hls.levels; if (!t.length) return -1; - const n = t.filter((r, s) => this.isLevelAllowed(r) && s <= e); + const n = t.filter((i, s) => this.isLevelAllowed(i) && s <= e); return this.clientRect = null, ud.getMaxLevelByMediaSize(n, this.mediaWidth, this.mediaHeight); } startCapping() { @@ -33395,12 +33395,12 @@ class ud { static getMaxLevelByMediaSize(e, t, n) { if (!(e != null && e.length)) return -1; - const r = (o, l) => l ? o.width !== l.width || o.height !== l.height : !0; + const i = (o, l) => l ? o.width !== l.width || o.height !== l.height : !0; let s = e.length - 1; const a = Math.max(t, n); for (let o = 0; o < e.length; o += 1) { const l = e[o]; - if ((l.width >= a || l.height >= a) && r(l, e[o + 1])) { + if ((l.width >= a || l.height >= a) && i(l, e[o + 1])) { s = o; break; } @@ -33451,22 +33451,22 @@ const dx = { */ HLS: "h" }, mx = fx; -class Hi { +class Hr { constructor(e, t) { - Array.isArray(e) && (e = e.map((n) => n instanceof Hi ? n : new Hi(n))), this.value = e, this.params = t; + Array.isArray(e) && (e = e.map((n) => n instanceof Hr ? n : new Hr(n))), this.value = e, this.params = t; } } const gx = "Dict"; -function px(i) { - return Array.isArray(i) ? JSON.stringify(i) : i instanceof Map ? "Map{}" : i instanceof Set ? "Set{}" : typeof i == "object" ? JSON.stringify(i) : String(i); +function px(r) { + return Array.isArray(r) ? JSON.stringify(r) : r instanceof Map ? "Map{}" : r instanceof Set ? "Set{}" : typeof r == "object" ? JSON.stringify(r) : String(r); } -function _x(i, e, t, n) { - return new Error(`failed to ${i} "${px(e)}" as ${t}`, { +function _x(r, e, t, n) { + return new Error(`failed to ${r} "${px(e)}" as ${t}`, { cause: n }); } -function Gi(i, e, t) { - return _x("serialize", i, e, t); +function Gr(r, e, t) { + return _x("serialize", r, e, t); } class R2 { constructor(e) { @@ -33474,131 +33474,131 @@ class R2 { } } const R1 = "Bare Item", vx = "Boolean"; -function yx(i) { - if (typeof i != "boolean") - throw Gi(i, vx); - return i ? "?1" : "?0"; +function yx(r) { + if (typeof r != "boolean") + throw Gr(r, vx); + return r ? "?1" : "?0"; } -function bx(i) { - return btoa(String.fromCharCode(...i)); +function bx(r) { + return btoa(String.fromCharCode(...r)); } const Ex = "Byte Sequence"; -function Sx(i) { - if (ArrayBuffer.isView(i) === !1) - throw Gi(i, Ex); - return `:${bx(i)}:`; +function Sx(r) { + if (ArrayBuffer.isView(r) === !1) + throw Gr(r, Ex); + return `:${bx(r)}:`; } const Tx = "Integer"; -function Ax(i) { - return i < -999999999999999 || 999999999999999 < i; +function Ax(r) { + return r < -999999999999999 || 999999999999999 < r; } -function C2(i) { - if (Ax(i)) - throw Gi(i, Tx); - return i.toString(); +function C2(r) { + if (Ax(r)) + throw Gr(r, Tx); + return r.toString(); } -function xx(i) { - return `@${C2(i.getTime() / 1e3)}`; +function xx(r) { + return `@${C2(r.getTime() / 1e3)}`; } -function F2(i, e) { - if (i < 0) - return -F2(-i, e); +function F2(r, e) { + if (r < 0) + return -F2(-r, e); const t = Math.pow(10, e); - if (Math.abs(i * t % 1 - 0.5) < Number.EPSILON) { - const r = Math.floor(i * t); - return (r % 2 === 0 ? r : r + 1) / t; + if (Math.abs(r * t % 1 - 0.5) < Number.EPSILON) { + const i = Math.floor(r * t); + return (i % 2 === 0 ? i : i + 1) / t; } else - return Math.round(i * t) / t; + return Math.round(r * t) / t; } const wx = "Decimal"; -function Dx(i) { - const e = F2(i, 3); +function Dx(r) { + const e = F2(r, 3); if (Math.floor(Math.abs(e)).toString().length > 12) - throw Gi(i, wx); + throw Gr(r, wx); const t = e.toString(); return t.includes(".") ? t : `${t}.0`; } const kx = "String", Ix = /[\x00-\x1f\x7f]+/; -function Lx(i) { - if (Ix.test(i)) - throw Gi(i, kx); - return `"${i.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`; +function Lx(r) { + if (Ix.test(r)) + throw Gr(r, kx); + return `"${r.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`; } -function Rx(i) { - return i.description || i.toString().slice(7, -1); +function Rx(r) { + return r.description || r.toString().slice(7, -1); } const Cx = "Token"; -function C1(i) { - const e = Rx(i); +function C1(r) { + const e = Rx(r); if (/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e) === !1) - throw Gi(e, Cx); + throw Gr(e, Cx); return e; } -function Vc(i) { - switch (typeof i) { +function Vc(r) { + switch (typeof r) { case "number": - if (!oe(i)) - throw Gi(i, R1); - return Number.isInteger(i) ? C2(i) : Dx(i); + if (!oe(r)) + throw Gr(r, R1); + return Number.isInteger(r) ? C2(r) : Dx(r); case "string": - return Lx(i); + return Lx(r); case "symbol": - return C1(i); + return C1(r); case "boolean": - return yx(i); + return yx(r); case "object": - if (i instanceof Date) - return xx(i); - if (i instanceof Uint8Array) - return Sx(i); - if (i instanceof R2) - return C1(i); + if (r instanceof Date) + return xx(r); + if (r instanceof Uint8Array) + return Sx(r); + if (r instanceof R2) + return C1(r); default: - throw Gi(i, R1); + throw Gr(r, R1); } } const Fx = "Key"; -function Kc(i) { - if (/^[a-z*][a-z0-9\-_.*]*$/.test(i) === !1) - throw Gi(i, Fx); - return i; +function Kc(r) { + if (/^[a-z*][a-z0-9\-_.*]*$/.test(r) === !1) + throw Gr(r, Fx); + return r; } -function cd(i) { - return i == null ? "" : Object.entries(i).map(([e, t]) => t === !0 ? `;${Kc(e)}` : `;${Kc(e)}=${Vc(t)}`).join(""); +function cd(r) { + return r == null ? "" : Object.entries(r).map(([e, t]) => t === !0 ? `;${Kc(e)}` : `;${Kc(e)}=${Vc(t)}`).join(""); } -function P2(i) { - return i instanceof Hi ? `${Vc(i.value)}${cd(i.params)}` : Vc(i); +function P2(r) { + return r instanceof Hr ? `${Vc(r.value)}${cd(r.params)}` : Vc(r); } -function Px(i) { - return `(${i.value.map(P2).join(" ")})${cd(i.params)}`; +function Px(r) { + return `(${r.value.map(P2).join(" ")})${cd(r.params)}`; } -function Mx(i, e = { +function Mx(r, e = { whitespace: !0 }) { - if (typeof i != "object" || i == null) - throw Gi(i, gx); - const t = i instanceof Map ? i.entries() : Object.entries(i), n = e != null && e.whitespace ? " " : ""; - return Array.from(t).map(([r, s]) => { - s instanceof Hi || (s = new Hi(s)); - let a = Kc(r); + if (typeof r != "object" || r == null) + throw Gr(r, gx); + const t = r instanceof Map ? r.entries() : Object.entries(r), n = e != null && e.whitespace ? " " : ""; + return Array.from(t).map(([i, s]) => { + s instanceof Hr || (s = new Hr(s)); + let a = Kc(i); return s.value === !0 ? a += cd(s.params) : (a += "=", Array.isArray(s.value) ? a += Px(s) : a += P2(s)), a; }).join(`,${n}`); } -function M2(i, e) { - return Mx(i, e); +function M2(r, e) { + return Mx(r, e); } -const Ai = "CMCD-Object", _t = "CMCD-Request", Hr = "CMCD-Session", pr = "CMCD-Status", Ox = { +const Ar = "CMCD-Object", _t = "CMCD-Request", Hi = "CMCD-Session", pi = "CMCD-Status", Ox = { // Object - br: Ai, - ab: Ai, - d: Ai, - ot: Ai, - tb: Ai, - tpb: Ai, - lb: Ai, - tab: Ai, - lab: Ai, - url: Ai, + br: Ar, + ab: Ar, + d: Ar, + ot: Ar, + tb: Ar, + tpb: Ar, + lb: Ar, + tab: Ar, + lab: Ar, + url: Ar, // Request pb: _t, bl: _t, @@ -33623,66 +33623,66 @@ const Ai = "CMCD-Object", _t = "CMCD-Request", Hr = "CMCD-Session", pr = "CMCD-S // TODO: Which header to put the `ts` field is not defined yet. ts: _t, // Session - cid: Hr, - pr: Hr, - sf: Hr, - sid: Hr, - st: Hr, - v: Hr, - msd: Hr, + cid: Hi, + pr: Hi, + sf: Hi, + sid: Hi, + st: Hi, + v: Hi, + msd: Hi, // Status - bs: pr, - bsd: pr, - cdn: pr, - rtp: pr, - bg: pr, - pt: pr, - ec: pr, - e: pr + bs: pi, + bsd: pi, + cdn: pi, + rtp: pi, + bg: pi, + pt: pi, + ec: pi, + e: pi }, Bx = { /** * keys whose values vary with each request. */ REQUEST: _t }; -function Nx(i) { - return Object.keys(i).reduce((e, t) => { +function Nx(r) { + return Object.keys(r).reduce((e, t) => { var n; - return (n = i[t]) === null || n === void 0 || n.forEach((r) => e[r] = t), e; + return (n = r[t]) === null || n === void 0 || n.forEach((i) => e[i] = t), e; }, {}); } -function $x(i, e) { +function $x(r, e) { const t = {}; - if (!i) + if (!r) return t; - const n = Object.keys(i), r = e ? Nx(e) : {}; + const n = Object.keys(r), i = e ? Nx(e) : {}; return n.reduce((s, a) => { var o; - const l = Ox[a] || r[a] || Bx.REQUEST, u = (o = s[l]) !== null && o !== void 0 ? o : s[l] = {}; - return u[a] = i[a], s; + const l = Ox[a] || i[a] || Bx.REQUEST, u = (o = s[l]) !== null && o !== void 0 ? o : s[l] = {}; + return u[a] = r[a], s; }, t); } -function Ux(i) { - return ["ot", "sf", "st", "e", "sta"].includes(i); +function Ux(r) { + return ["ot", "sf", "st", "e", "sta"].includes(r); } -function Hx(i) { - return typeof i == "number" ? oe(i) : i != null && i !== "" && i !== !1; +function Hx(r) { + return typeof r == "number" ? oe(r) : r != null && r !== "" && r !== !1; } const O2 = "event"; -function Gx(i, e) { - const t = new URL(i), n = new URL(e); +function Gx(r, e) { + const t = new URL(r), n = new URL(e); if (t.origin !== n.origin) - return i; - const r = t.pathname.split("/").slice(1), s = n.pathname.split("/").slice(1, -1); - for (; r[0] === s[0]; ) - r.shift(), s.shift(); + return r; + const i = t.pathname.split("/").slice(1), s = n.pathname.split("/").slice(1, -1); + for (; i[0] === s[0]; ) + i.shift(), s.shift(); for (; s.length; ) - s.shift(), r.unshift(".."); - return r.join("/") + t.search + t.hash; + s.shift(), i.unshift(".."); + return i.join("/") + t.search + t.hash; } -const dl = (i) => Math.round(i), jc = (i, e) => Array.isArray(i) ? i.map((t) => jc(t, e)) : i instanceof Hi && typeof i.value == "string" ? new Hi(jc(i.value, e), i.params) : (e.baseUrl && (i = Gx(i, e.baseUrl)), e.version === 1 ? encodeURIComponent(i) : i), zo = (i) => dl(i / 100) * 100, zx = (i, e) => { - let t = i; - return e.version >= 2 && (i instanceof Hi && typeof i.value == "string" ? t = new Hi([i]) : typeof i == "string" && (t = [i])), jc(t, e); +const dl = (r) => Math.round(r), jc = (r, e) => Array.isArray(r) ? r.map((t) => jc(t, e)) : r instanceof Hr && typeof r.value == "string" ? new Hr(jc(r.value, e), r.params) : (e.baseUrl && (r = Gx(r, e.baseUrl)), e.version === 1 ? encodeURIComponent(r) : r), zo = (r) => dl(r / 100) * 100, zx = (r, e) => { + let t = r; + return e.version >= 2 && (r instanceof Hr && typeof r.value == "string" ? t = new Hr([r]) : typeof r == "string" && (t = [r])), jc(t, e); }, qx = { /** * Bitrate (kbps) rounded integer @@ -33717,46 +33717,46 @@ const dl = (i) => Math.round(i), jc = (i, e) => Array.isArray(i) ? i.map((t) => */ tb: dl }, B2 = "request", N2 = "response", hd = ["ab", "bg", "bl", "br", "bs", "bsd", "cdn", "cid", "cs", "df", "ec", "lab", "lb", "ltc", "msd", "mtp", "pb", "pr", "pt", "sf", "sid", "sn", "st", "sta", "tab", "tb", "tbl", "tpb", "ts", "v"], Vx = ["e"], Kx = /^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/; -function w0(i) { - return Kx.test(i); +function w0(r) { + return Kx.test(r); } -function jx(i) { - return hd.includes(i) || Vx.includes(i) || w0(i); +function jx(r) { + return hd.includes(r) || Vx.includes(r) || w0(r); } const $2 = ["d", "dl", "nor", "ot", "rtp", "su"]; -function Wx(i) { - return hd.includes(i) || $2.includes(i) || w0(i); +function Wx(r) { + return hd.includes(r) || $2.includes(r) || w0(r); } const Yx = ["cmsdd", "cmsds", "rc", "smrt", "ttfb", "ttfbb", "ttlb", "url"]; -function Xx(i) { - return hd.includes(i) || $2.includes(i) || Yx.includes(i) || w0(i); +function Xx(r) { + return hd.includes(r) || $2.includes(r) || Yx.includes(r) || w0(r); } const Qx = ["bl", "br", "bs", "cid", "d", "dl", "mtp", "nor", "nrr", "ot", "pr", "rtp", "sf", "sid", "st", "su", "tb", "v"]; -function Zx(i) { - return Qx.includes(i) || w0(i); +function Zx(r) { + return Qx.includes(r) || w0(r); } const Jx = { [N2]: Xx, [O2]: jx, [B2]: Wx }; -function U2(i, e = {}) { +function U2(r, e = {}) { const t = {}; - if (i == null || typeof i != "object") + if (r == null || typeof r != "object") return t; - const n = e.version || i.v || 1, r = e.reportingMode || B2, s = n === 1 ? Zx : Jx[r]; - let a = Object.keys(i).filter(s); + const n = e.version || r.v || 1, i = e.reportingMode || B2, s = n === 1 ? Zx : Jx[i]; + let a = Object.keys(r).filter(s); const o = e.filter; typeof o == "function" && (a = a.filter(o)); - const l = r === N2 || r === O2; + const l = i === N2 || i === O2; l && !a.includes("ts") && a.push("ts"), n > 1 && !a.includes("v") && a.push("v"); const u = Qe({}, qx, e.formatters), c = { version: n, - reportingMode: r, + reportingMode: i, baseUrl: e.baseUrl }; return a.sort().forEach((h) => { - let d = i[h]; + let d = r[h]; const f = u[h]; if (typeof f == "function" && (d = f(d, c)), h === "v") { if (n === 1) @@ -33766,76 +33766,76 @@ function U2(i, e = {}) { h == "pr" && d === 1 || (l && h === "ts" && !oe(d) && (d = Date.now()), Hx(d) && (Ux(h) && typeof d == "string" && (d = new R2(d)), t[h] = d)); }), t; } -function e9(i, e = {}) { +function ew(r, e = {}) { const t = {}; - if (!i) + if (!r) return t; - const n = U2(i, e), r = $x(n, e == null ? void 0 : e.customHeaderMap); - return Object.entries(r).reduce((s, [a, o]) => { + const n = U2(r, e), i = $x(n, e == null ? void 0 : e.customHeaderMap); + return Object.entries(i).reduce((s, [a, o]) => { const l = M2(o, { whitespace: !1 }); return l && (s[a] = l), s; }, t); } -function t9(i, e, t) { - return Qe(i, e9(e, t)); +function tw(r, e, t) { + return Qe(r, ew(e, t)); } -const n9 = "CMCD"; -function i9(i, e = {}) { - return i ? M2(U2(i, e), { +const nw = "CMCD"; +function rw(r, e = {}) { + return r ? M2(U2(r, e), { whitespace: !1 }) : ""; } -function r9(i, e = {}) { - if (!i) +function iw(r, e = {}) { + if (!r) return ""; - const t = i9(i, e); + const t = rw(r, e); return encodeURIComponent(t); } -function s9(i, e = {}) { - if (!i) +function sw(r, e = {}) { + if (!r) return ""; - const t = r9(i, e); - return `${n9}=${t}`; + const t = iw(r, e); + return `${nw}=${t}`; } const F1 = /CMCD=[^&#]+/; -function a9(i, e, t) { - const n = s9(e, t); +function aw(r, e, t) { + const n = sw(e, t); if (!n) - return i; - if (F1.test(i)) - return i.replace(F1, n); - const r = i.includes("?") ? "&" : "?"; - return `${i}${r}${n}`; + return r; + if (F1.test(r)) + return r.replace(F1, n); + const i = r.includes("?") ? "&" : "?"; + return `${r}${i}${n}`; } -class o9 { +class ow { constructor(e) { this.hls = void 0, this.config = void 0, this.media = void 0, this.sid = void 0, this.cid = void 0, this.useHeaders = !1, this.includeKeys = void 0, this.initialized = !1, this.starved = !1, this.buffering = !0, this.audioBuffer = void 0, this.videoBuffer = void 0, this.onWaiting = () => { this.initialized && (this.starved = !0), this.buffering = !0; }, this.onPlaying = () => { this.initialized || (this.initialized = !0), this.buffering = !1; - }, this.applyPlaylistData = (r) => { + }, this.applyPlaylistData = (i) => { try { - this.apply(r, { + this.apply(i, { ot: yn.MANIFEST, su: !this.initialized }); } catch (s) { this.hls.logger.warn("Could not generate manifest CMCD data.", s); } - }, this.applyFragmentData = (r) => { + }, this.applyFragmentData = (i) => { try { const { frag: s, part: a - } = r, o = this.hls.levels[s.level], l = this.getObjectType(s), u = { + } = i, o = this.hls.levels[s.level], l = this.getObjectType(s), u = { d: (a || s).duration * 1e3, ot: l }; (l === yn.VIDEO || l === yn.AUDIO || l == yn.MUXED) && (u.br = o.bitrate / 1e3, u.tb = this.getTopBandwidth(l) / 1e3, u.bl = this.getBufferLength(l)); const c = a ? this.getNextPart(a) : this.getNextFrag(s); - c != null && c.url && c.url !== s.url && (u.nor = c.url), this.apply(r, u); + c != null && c.url && c.url !== s.url && (u.nor = c.url), this.apply(i, u); } catch (s) { this.hls.logger.warn("Could not generate segment CMCD data.", s); } @@ -33863,8 +33863,8 @@ class o9 { this.media && (this.media.removeEventListener("waiting", this.onWaiting), this.media.removeEventListener("playing", this.onPlaying), this.media = null); } onBufferCreated(e, t) { - var n, r; - this.audioBuffer = (n = t.tracks.audio) == null ? void 0 : n.buffer, this.videoBuffer = (r = t.tracks.video) == null ? void 0 : r.buffer; + var n, i; + this.audioBuffer = (n = t.tracks.audio) == null ? void 0 : n.buffer, this.videoBuffer = (i = t.tracks.video) == null ? void 0 : i.buffer; } /** * Create baseline CMCD data @@ -33888,32 +33888,32 @@ class o9 { const n = t.ot === yn.INIT || t.ot === yn.VIDEO || t.ot === yn.MUXED; this.starved && n && (t.bs = !0, t.su = !0, this.starved = !1), t.su == null && (t.su = this.buffering); const { - includeKeys: r + includeKeys: i } = this; - r && (t = Object.keys(t).reduce((a, o) => (r.includes(o) && (a[o] = t[o]), a), {})); + i && (t = Object.keys(t).reduce((a, o) => (i.includes(o) && (a[o] = t[o]), a), {})); const s = { baseUrl: e.url }; - this.useHeaders ? (e.headers || (e.headers = {}), t9(e.headers, t, s)) : e.url = a9(e.url, t, s); + this.useHeaders ? (e.headers || (e.headers = {}), tw(e.headers, t, s)) : e.url = aw(e.url, t, s); } getNextFrag(e) { var t; const n = (t = this.hls.levels[e.level]) == null ? void 0 : t.details; if (n) { - const r = e.sn - n.startSN; - return n.fragments[r + 1]; + const i = e.sn - n.startSN; + return n.fragments[i + 1]; } } getNextPart(e) { var t; const { index: n, - fragment: r - } = e, s = (t = this.hls.levels[r.level]) == null || (t = t.details) == null ? void 0 : t.partList; + fragment: i + } = e, s = (t = this.hls.levels[i.level]) == null || (t = t.details) == null ? void 0 : t.partList; if (s) { const { sn: a - } = r; + } = i; for (let o = s.length - 1; o >= 0; o--) { const l = s[o]; if (l.index === n && l.fragment.sn === a) @@ -33942,12 +33942,12 @@ class o9 { */ getTopBandwidth(e) { let t = 0, n; - const r = this.hls; + const i = this.hls; if (e === yn.AUDIO) - n = r.audioTracks; + n = i.audioTracks; else { - const s = r.maxAutoLevel, a = s > -1 ? s + 1 : r.levels.length; - n = r.levels.slice(0, a); + const s = i.maxAutoLevel, a = s > -1 ? s + 1 : i.levels.length; + n = i.levels.slice(0, a); } return n.forEach((s) => { s.bitrate > t && (t = s.bitrate); @@ -34017,8 +34017,8 @@ class o9 { }; } } -const l9 = 3e5; -class u9 extends ni { +const lw = 3e5; +class uw extends nr { constructor(e) { super("content-steering", e.logger), this.hls = void 0, this.loader = null, this.uri = null, this.pathwayId = ".", this._pathwayPriority = null, this.timeToLoad = 300, this.reloadTimer = -1, this.updated = 0, this.started = !1, this.enabled = !0, this.levels = null, this.audioTracks = null, this.subtitleTracks = null, this.penalizedPathways = {}, this.hls = e, this.registerListeners(); } @@ -34081,7 +34081,7 @@ class u9 extends ni { errorAction: n } = t; if ((n == null ? void 0 : n.action) === Vt.SendAlternateToPenaltyBox && n.flags === kn.MoveAllAlternatesMatchingHost) { - const r = this.levels; + const i = this.levels; let s = this._pathwayPriority, a = this.pathwayId; if (t.context) { const { @@ -34089,9 +34089,9 @@ class u9 extends ni { pathwayId: l, type: u } = t.context; - o && r ? a = this.getPathwayForGroupId(o, u, a) : l && (a = l); + o && i ? a = this.getPathwayForGroupId(o, u, a) : l && (a = l); } - a in this.penalizedPathways || (this.penalizedPathways[a] = performance.now()), !s && r && (s = this.pathways()), s && s.length > 1 && (this.updatePathwayPriority(s), n.resolved = this.pathwayId !== a), t.details === G.BUFFER_APPEND_ERROR && !t.fatal ? n.resolved = !0 : n.resolved || this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${r && r.length} priorities: ${et(s)} penalized: ${et(this.penalizedPathways)}`); + a in this.penalizedPathways || (this.penalizedPathways[a] = performance.now()), !s && i && (s = this.pathways()), s && s.length > 1 && (this.updatePathwayPriority(s), n.resolved = this.pathwayId !== a), t.details === G.BUFFER_APPEND_ERROR && !t.fatal ? n.resolved = !0 : n.resolved || this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${i && i.length} priorities: ${et(s)} penalized: ${et(this.penalizedPathways)}`); } } filterParsedLevels(e) { @@ -34109,9 +34109,9 @@ class u9 extends ni { updatePathwayPriority(e) { this._pathwayPriority = e; let t; - const n = this.penalizedPathways, r = performance.now(); + const n = this.penalizedPathways, i = performance.now(); Object.keys(n).forEach((s) => { - r - n[s] > l9 && delete n[s]; + i - n[s] > lw && delete n[s]; }); for (let s = 0; s < e.length; s++) { const a = e[s]; @@ -34131,17 +34131,17 @@ class u9 extends ni { } } getPathwayForGroupId(e, t, n) { - const r = this.getLevelsForPathway(n).concat(this.levels || []); - for (let s = 0; s < r.length; s++) - if (t === Be.AUDIO_TRACK && r[s].hasAudioGroup(e) || t === Be.SUBTITLE_TRACK && r[s].hasSubtitleGroup(e)) - return r[s].pathwayId; + const i = this.getLevelsForPathway(n).concat(this.levels || []); + for (let s = 0; s < i.length; s++) + if (t === Be.AUDIO_TRACK && i[s].hasAudioGroup(e) || t === Be.SUBTITLE_TRACK && i[s].hasSubtitleGroup(e)) + return i[s].pathwayId; return n; } clonePathways(e) { const t = this.levels; if (!t) return; - const n = {}, r = {}; + const n = {}, i = {}; e.forEach((s) => { const { ID: a, @@ -34154,7 +34154,7 @@ class u9 extends ni { const h = new ct(c.attrs); h["PATHWAY-ID"] = a; const d = h.AUDIO && `${h.AUDIO}_clone_${a}`, f = h.SUBTITLES && `${h.SUBTITLES}_clone_${a}`; - d && (n[h.AUDIO] = d, h.AUDIO = d), f && (r[h.SUBTITLES] = f, h.SUBTITLES = f); + d && (n[h.AUDIO] = d, h.AUDIO = d), f && (i[h.SUBTITLES] = f, h.SUBTITLES = f); const m = H2(c.uri, h["STABLE-VARIANT-ID"], "PER-VARIANT-URIS", l), g = new Ka({ attrs: h, audioCodec: c.audioCodec, @@ -34173,26 +34173,26 @@ class u9 extends ni { g.addGroupId("text", `${c.subtitleGroups[p]}_clone_${a}`); return g; }); - t.push(...u), P1(this.audioTracks, n, l, a), P1(this.subtitleTracks, r, l, a); + t.push(...u), P1(this.audioTracks, n, l, a), P1(this.subtitleTracks, i, l, a); }); } loadSteeringManifest(e) { const t = this.hls.config, n = t.loader; this.loader && this.loader.destroy(), this.loader = new n(t); - let r; + let i; try { - r = new self.URL(e); + i = new self.URL(e); } catch { this.enabled = !1, this.log(`Failed to parse Steering Manifest URI: ${e}`); return; } - if (r.protocol !== "data:") { + if (i.protocol !== "data:") { const c = (this.hls.bandwidthEstimate || t.abrEwmaDefaultEstimate) | 0; - r.searchParams.set("_HLS_pathway", this.pathwayId), r.searchParams.set("_HLS_throughput", "" + c); + i.searchParams.set("_HLS_pathway", this.pathwayId), i.searchParams.set("_HLS_throughput", "" + c); } const s = { responseType: "json", - url: r.href + url: i.href }, a = t.steeringManifestLoadPolicy.default, o = a.errorRetry || a.timeoutRetry || {}, l = { loadPolicy: a, timeout: a.maxLoadTimeMs, @@ -34201,7 +34201,7 @@ class u9 extends ni { maxRetryDelay: o.maxRetryDelayMs || 0 }, u = { onSuccess: (c, h, d, f) => { - this.log(`Loaded steering manifest: "${r}"`); + this.log(`Loaded steering manifest: "${i}"`); const m = c.data; if ((m == null ? void 0 : m.VERSION) !== 1) { this.log(`Steering VERSION ${m.VERSION} not supported!`); @@ -34215,7 +34215,7 @@ class u9 extends ni { } = m; if (g) try { - this.uri = new self.URL(g, r).href; + this.uri = new self.URL(g, i).href; } catch { this.enabled = !1, this.log(`Failed to parse Steering Manifest RELOAD-URI: ${g}`); return; @@ -34223,7 +34223,7 @@ class u9 extends ni { this.scheduleRefresh(this.uri || d.url), p && this.clonePathways(p); const y = { steeringManifest: m, - url: r.toString() + url: i.toString() }; this.hls.trigger(S.STEERING_MANIFEST_LOADED, y), b && this.updatePathwayPriority(b); }, @@ -34248,13 +34248,13 @@ class u9 extends ni { this.log(`Timeout loading steering manifest (${h.url})`), this.scheduleRefresh(this.uri || h.url); } }; - this.log(`Requesting steering manifest: ${r}`), this.loader.load(s, l, u); + this.log(`Requesting steering manifest: ${i}`), this.loader.load(s, l, u); } scheduleRefresh(e, t = this.timeToLoad * 1e3) { this.clearTimeout(), this.reloadTimer = self.setTimeout(() => { var n; - const r = (n = this.hls) == null ? void 0 : n.media; - if (r && !r.ended) { + const i = (n = this.hls) == null ? void 0 : n.media; + if (i && !i.ended) { this.loadSteeringManifest(e); return; } @@ -34262,36 +34262,36 @@ class u9 extends ni { }, t); } } -function P1(i, e, t, n) { - i && Object.keys(e).forEach((r) => { - const s = i.filter((a) => a.groupId === r).map((a) => { +function P1(r, e, t, n) { + r && Object.keys(e).forEach((i) => { + const s = r.filter((a) => a.groupId === i).map((a) => { const o = Qe({}, a); - return o.details = void 0, o.attrs = new ct(o.attrs), o.url = o.attrs.URI = H2(a.url, a.attrs["STABLE-RENDITION-ID"], "PER-RENDITION-URIS", t), o.groupId = o.attrs["GROUP-ID"] = e[r], o.attrs["PATHWAY-ID"] = n, o; + return o.details = void 0, o.attrs = new ct(o.attrs), o.url = o.attrs.URI = H2(a.url, a.attrs["STABLE-RENDITION-ID"], "PER-RENDITION-URIS", t), o.groupId = o.attrs["GROUP-ID"] = e[i], o.attrs["PATHWAY-ID"] = n, o; }); - i.push(...s); + r.push(...s); }); } -function H2(i, e, t, n) { +function H2(r, e, t, n) { const { - HOST: r, + HOST: i, PARAMS: s, [t]: a } = n; let o; - e && (o = a == null ? void 0 : a[e], o && (i = o)); - const l = new self.URL(i); - return r && !o && (l.host = r), s && Object.keys(s).sort().forEach((u) => { + e && (o = a == null ? void 0 : a[e], o && (r = o)); + const l = new self.URL(r); + return i && !o && (l.host = i), s && Object.keys(s).sort().forEach((u) => { u && l.searchParams.set(u, s[u]); }), l.href; } -class Hs extends ni { +class Hs extends nr { constructor(e) { super("eme", e.logger), this.hls = void 0, this.config = void 0, this.media = null, this.mediaResolved = void 0, this.keyFormatPromise = null, this.keySystemAccessPromises = {}, this._requestLicenseFailureCount = 0, this.mediaKeySessions = [], this.keyIdToKeySessionPromise = {}, this.mediaKeys = null, this.setMediaKeysQueue = Hs.CDMCleanupPromise ? [Hs.CDMCleanupPromise] : [], this.bannedKeyIds = {}, this.onMediaEncrypted = (t) => { const { initDataType: n, - initData: r + initData: i } = t, s = `"${t.type}" event: init data type: "${n}"`; - if (this.debug(s), r !== null) { + if (this.debug(s), i !== null) { if (!this.keyFormatPromise) { let a = Object.keys(this.keySystemAccessPromises); a.length || (a = Aa(this.config)); @@ -34306,7 +34306,7 @@ class Hs extends ni { } let l; try { - const f = Mt(new Uint8Array(r)), m = Jh(JSON.parse(f).sinf), g = Mv(m); + const f = Mt(new Uint8Array(i)), m = Jh(JSON.parse(f).sinf), g = Mv(m); if (!g) throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc"); l = new Uint8Array(g.subarray(8, 24)); @@ -34329,7 +34329,7 @@ class Hs extends ni { continue; if (g.pssh) break; - delete c[p], g.pssh = new Uint8Array(r), g.keyId = l, d = c[u] = d.then(() => this.generateRequestWithPreferredKeySession(m, n, r, "encrypted-event-key-match")), d.catch((b) => this.handleError(b)); + delete c[p], g.pssh = new Uint8Array(i), g.keyId = l, d = c[u] = d.then(() => this.generateRequestWithPreferredKeySession(m, n, i, "encrypted-event-key-match")), d.catch((b) => this.handleError(b)); break; } } @@ -34355,9 +34355,9 @@ class Hs extends ni { const { drmSystems: t, widevineLicenseUrl: n - } = this.config, r = t == null ? void 0 : t[e]; - if (r) - return r.licenseUrl; + } = this.config, i = t == null ? void 0 : t[e]; + if (i) + return i.licenseUrl; if (e === dt.WIDEVINE && n) return n; } @@ -34376,11 +34376,11 @@ class Hs extends ni { this.log(`No Server Certificate in config.drmSystems["${e}"]`); } attemptKeySystemAccess(e) { - const t = this.hls.levels, n = (a, o, l) => !!a && l.indexOf(a) === o, r = t.map((a) => a.audioCodec).filter(n), s = t.map((a) => a.videoCodec).filter(n); - return r.length + s.length === 0 && s.push("avc1.42e01e"), new Promise((a, o) => { + const t = this.hls.levels, n = (a, o, l) => !!a && l.indexOf(a) === o, i = t.map((a) => a.audioCodec).filter(n), s = t.map((a) => a.videoCodec).filter(n); + return i.length + s.length === 0 && s.push("avc1.42e01e"), new Promise((a, o) => { const l = (u) => { const c = u.shift(); - this.getMediaKeysPromise(c, r, s).then((h) => a({ + this.getMediaKeysPromise(c, i, s).then((h) => a({ keySystem: c, mediaKeys: h })).catch((h) => { @@ -34400,15 +34400,15 @@ class Hs extends ni { requestMediaKeySystemAccessFunc: n } = this.config; if (typeof n != "function") { - let r = `Configured requestMediaKeySystemAccess is not a function ${n}`; - return Zv === null && self.location.protocol === "http:" && (r = `navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`), Promise.reject(new Error(r)); + let i = `Configured requestMediaKeySystemAccess is not a function ${n}`; + return Zv === null && self.location.protocol === "http:" && (i = `navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`), Promise.reject(new Error(i)); } return n(e, t); } getMediaKeysPromise(e, t, n) { - var r; + var i; const s = zT(e, t, n, this.config.drmSystemOptions || {}); - let a = this.keySystemAccessPromises[e], o = (r = a) == null ? void 0 : r.keySystemAccess; + let a = this.keySystemAccessPromises[e], o = (i = a) == null ? void 0 : i.keySystemAccess; if (!o) { this.log(`Requesting encrypted media "${e}" key-system access with config: ${et(s)}`), o = this.requestMediaKeySystemAccess(e, s); const l = a = this.keySystemAccessPromises[e] = { @@ -34434,11 +34434,11 @@ class Hs extends ni { mediaKeys: n }) { this.log(`Creating key-system session "${t}" keyId: ${Kt(e.keyId || [])} keyUri: ${e.uri}`); - const r = n.createSession(), s = { + const i = n.createSession(), s = { decryptdata: e, keySystem: t, mediaKeys: n, - mediaKeysSession: r, + mediaKeysSession: i, keyStatus: "status-pending" }; return this.mediaKeySessions.push(s), s; @@ -34446,8 +34446,8 @@ class Hs extends ni { renewKeySession(e) { const t = e.decryptdata; if (t.pssh) { - const n = this.createMediaKeySessionContext(e), r = qo(t), s = "cenc"; - this.keyIdToKeySessionPromise[r] = this.generateRequestWithPreferredKeySession(n, s, t.pssh.buffer, "expired"); + const n = this.createMediaKeySessionContext(e), i = qo(t), s = "cenc"; + this.keyIdToKeySessionPromise[i] = this.generateRequestWithPreferredKeySession(n, s, t.pssh.buffer, "expired"); } else this.warn("Could not renew expired session. Missing pssh initData."); this.removeSession(e); @@ -34476,10 +34476,10 @@ class Hs extends ni { selectKeySystem(e) { return new Promise((t, n) => { this.getKeySystemSelectionPromise(e).then(({ - keySystem: r + keySystem: i }) => { - const s = Cu(r); - s ? t(s) : n(new Error(`Unable to find format for key-system "${r}"`)); + const s = Cu(i); + s ? t(s) : n(new Error(`Unable to find format for key-system "${i}"`)); }).catch(n); }); } @@ -34488,7 +34488,7 @@ class Hs extends ni { return this.keyFormatPromise || (this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`), this.keyFormatPromise = this.getKeyFormatPromise(t)), this.keyFormatPromise; } getKeyFormatPromise(e) { - const t = Aa(this.config), n = e.map(ul).filter((r) => !!r && t.indexOf(r) !== -1); + const t = Aa(this.config), n = e.map(ul).filter((i) => !!i && t.indexOf(i) !== -1); return this.selectKeySystem(n); } getKeyStatus(e) { @@ -34496,15 +34496,15 @@ class Hs extends ni { mediaKeySessions: t } = this; for (let n = 0; n < t.length; n++) { - const r = c9(e, t[n]); - if (r) - return r; + const i = cw(e, t[n]); + if (i) + return i; } } loadKey(e) { - const t = e.keyInfo.decryptdata, n = qo(t), r = this.bannedKeyIds[n]; - if (r || this.getKeyStatus(t) === "internal-error") { - const o = M1(r || "internal-error", t); + const t = e.keyInfo.decryptdata, n = qo(t), i = this.bannedKeyIds[n]; + if (i || this.getKeyStatus(t) === "internal-error") { + const o = M1(i || "internal-error", t); return this.handleError(o, e.frag), Promise.reject(o); } const s = `(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`; @@ -34554,7 +34554,7 @@ class Hs extends ni { getKeySystemForKeyPromise(e) { const t = qo(e), n = this.keyIdToKeySessionPromise[t]; if (!n) { - const r = ul(e.keyFormat), s = r ? [r] : Aa(this.config); + const i = ul(e.keyFormat), s = i ? [i] : Aa(this.config); return this.attemptKeySystemAccess(s); } return n; @@ -34575,18 +34575,18 @@ class Hs extends ni { return Promise.resolve(); const n = this.setMediaKeysQueue.slice(); this.log(`Setting media-keys for "${e}"`); - const r = Promise.all(n).then(() => this.media ? this.media.setMediaKeys(t) : new Promise((s, a) => { + const i = Promise.all(n).then(() => this.media ? this.media.setMediaKeys(t) : new Promise((s, a) => { this.mediaResolved = () => { if (this.mediaResolved = void 0, !this.media) return a(new Error("Attempted to set mediaKeys without media element attached")); this.mediaKeys = t, this.media.setMediaKeys(t).then(s).catch(a); }; })); - return this.mediaKeys = t, this.setMediaKeysQueue.push(r), r.then(() => { - this.log(`Media-keys set for "${e}"`), n.push(r), this.setMediaKeysQueue = this.setMediaKeysQueue.filter((s) => n.indexOf(s) === -1); + return this.mediaKeys = t, this.setMediaKeysQueue.push(i), i.then(() => { + this.log(`Media-keys set for "${e}"`), n.push(i), this.setMediaKeysQueue = this.setMediaKeysQueue.filter((s) => n.indexOf(s) === -1); }); } - generateRequestWithPreferredKeySession(e, t, n, r) { + generateRequestWithPreferredKeySession(e, t, n, i) { var s; const a = (s = this.config.drmSystems) == null || (s = s[e.keySystem]) == null ? void 0 : s.generateRequest; if (a) @@ -34600,9 +34600,9 @@ class Hs extends ni { throw m; } if (n === null) - return this.log(`Skipping key-session request for "${r}" (no initData)`), Promise.resolve(e); + return this.log(`Skipping key-session request for "${i}" (no initData)`), Promise.resolve(e); const o = qo(e.decryptdata), l = e.decryptdata.uri; - this.log(`Generating key-session request for "${r}" keyId: ${o} URI: ${l} (init data type: ${t} length: ${n.byteLength})`); + this.log(`Generating key-session request for "${i}" keyId: ${o} URI: ${l} (init data type: ${t} length: ${n.byteLength})`); const u = new td(), c = e._onmessage = (m) => { const g = e.mediaKeysSession; if (!g) { @@ -34667,12 +34667,12 @@ class Hs extends ni { } getKeyStatuses(e) { const t = {}; - return e.mediaKeysSession.keyStatuses.forEach((n, r) => { - if (typeof r == "string" && typeof n == "object") { - const o = r; - r = n, n = o; + return e.mediaKeysSession.keyStatuses.forEach((n, i) => { + if (typeof i == "string" && typeof n == "object") { + const o = i; + i = n, n = o; } - const s = "buffer" in r ? new Uint8Array(r.buffer, r.byteOffset, r.byteLength) : new Uint8Array(r); + const s = "buffer" in i ? new Uint8Array(i.buffer, i.byteOffset, i.byteLength) : new Uint8Array(i); if (e.keySystem === dt.PLAYREADY && s.length === 16) { const o = Kt(s); t[o] = n, Xv(s); @@ -34682,7 +34682,7 @@ class Hs extends ni { }), t; } fetchServerCertificate(e) { - const t = this.config, n = t.loader, r = new n(t), s = this.getServerCertificateUrl(e); + const t = this.config, n = t.loader, i = new n(t), s = this.getServerCertificateUrl(e); return s ? (this.log(`Fetching server certificate for "${e}"`), new Promise((a, o) => { const l = { responseType: "arraybuffer", @@ -34725,13 +34725,13 @@ class Hs extends ni { o(new Error("aborted")); } }; - r.load(l, c, h); + i.load(l, c, h); })) : Promise.resolve(); } setMediaKeysServerCertificate(e, t, n) { - return new Promise((r, s) => { + return new Promise((i, s) => { e.setServerCertificate(n).then((a) => { - this.log(`setServerCertificate ${a ? "success" : "not supported by CDM"} (${n.byteLength}) on "${t}"`), r(e); + this.log(`setServerCertificate ${a ? "success" : "not supported by CDM"} (${n.byteLength}) on "${t}"`), i(e); }).catch((a) => { s(new Dn({ type: fe.KEY_SYSTEM_ERROR, @@ -34743,21 +34743,21 @@ class Hs extends ni { }); } renewLicense(e, t) { - return this.requestLicense(e, new Uint8Array(t)).then((n) => this.updateKeySession(e, new Uint8Array(n)).catch((r) => { + return this.requestLicense(e, new Uint8Array(t)).then((n) => this.updateKeySession(e, new Uint8Array(n)).catch((i) => { throw new Dn({ type: fe.KEY_SYSTEM_ERROR, details: G.KEY_SYSTEM_SESSION_UPDATE_FAILED, decryptdata: e.decryptdata, - error: r, + error: i, fatal: !1 - }, r.message); + }, i.message); })); } unpackPlayReadyKeyMessage(e, t) { const n = String.fromCharCode.apply(null, new Uint16Array(t.buffer)); if (!n.includes("PlayReadyKeyMessage")) return e.setRequestHeader("Content-Type", "text/xml; charset=utf-8"), t; - const r = new DOMParser().parseFromString(n, "application/xml"), s = r.querySelectorAll("HttpHeader"); + const i = new DOMParser().parseFromString(n, "application/xml"), s = i.querySelectorAll("HttpHeader"); if (s.length > 0) { let c; for (let h = 0, d = s.length; h < d; h++) { @@ -34767,32 +34767,32 @@ class Hs extends ni { f && m && e.setRequestHeader(f, m); } } - const l = r.querySelector("Challenge"), u = l == null ? void 0 : l.textContent; + const l = i.querySelector("Challenge"), u = l == null ? void 0 : l.textContent; if (!u) throw new Error("Cannot find in key message"); return $c(atob(u)); } - setupLicenseXHR(e, t, n, r) { + setupLicenseXHR(e, t, n, i) { const s = this.config.licenseXhrSetup; return s ? Promise.resolve().then(() => { if (!n.decryptdata) throw new Error("Key removed"); - return s.call(this.hls, e, t, n, r); + return s.call(this.hls, e, t, n, i); }).catch((a) => { if (!n.decryptdata) throw a; - return e.open("POST", t, !0), s.call(this.hls, e, t, n, r); + return e.open("POST", t, !0), s.call(this.hls, e, t, n, i); }).then((a) => (e.readyState || e.open("POST", t, !0), { xhr: e, - licenseChallenge: a || r + licenseChallenge: a || i })) : (e.open("POST", t, !0), Promise.resolve({ xhr: e, - licenseChallenge: r + licenseChallenge: i })); } requestLicense(e, t) { const n = this.config.keyLoadPolicy.default; - return new Promise((r, s) => { + return new Promise((i, s) => { const a = this.getLicenseServerUrlOrThrow(e.keySystem); this.log(`Sending license request to URL: ${a}`); const o = new XMLHttpRequest(); @@ -34811,7 +34811,7 @@ class Hs extends ni { } catch (c) { this.error(c); } - r(l); + i(l); } else { const l = n.errorRetry, u = l ? l.maxNumRetry : 0; if (this._requestLicenseFailureCount++, this._requestLicenseFailureCount > u || o.status >= 400 && o.status < 500) @@ -34830,7 +34830,7 @@ class Hs extends ni { }, `License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`)); else { const c = u - this._requestLicenseFailureCount + 1; - this.warn(`Retrying license request, ${c} attempts left`), this.requestLicense(e, t).then(r, s); + this.warn(`Retrying license request, ${c} attempts left`), this.requestLicense(e, t).then(i, s); } } }, e.licenseXhr && e.licenseXhr.readyState !== XMLHttpRequest.DONE && e.licenseXhr.abort(), e.licenseXhr = o, this.setupLicenseXHR(o, a, e, t).then(({ @@ -34849,8 +34849,8 @@ class Hs extends ni { return; const n = t.media; this.media = n, fn(n, "encrypted", this.onMediaEncrypted), fn(n, "waitingforkey", this.onWaitingForKey); - const r = this.mediaResolved; - r ? r() : this.mediaKeys = n.mediaKeys; + const i = this.mediaResolved; + i ? i() : this.mediaKeys = n.mediaKeys; } onMediaDetached() { const e = this.media; @@ -34862,10 +34862,10 @@ class Hs extends ni { const t = this.mediaResolved; if (t && t(), !this.mediaKeys && !this.mediaKeySessions.length) return; - const n = this.media, r = this.mediaKeySessions.slice(); - this.mediaKeySessions = [], this.mediaKeys = null, Ar.clearKeyUriToKeyIdMap(); - const s = r.length; - Hs.CDMCleanupPromise = Promise.all(r.map((a) => this.removeSession(a)).concat((n == null || (e = n.setMediaKeys(null)) == null ? void 0 : e.catch((a) => { + const n = this.media, i = this.mediaKeySessions.slice(); + this.mediaKeySessions = [], this.mediaKeys = null, Ai.clearKeyUriToKeyIdMap(); + const s = i.length; + Hs.CDMCleanupPromise = Promise.all(i.map((a) => this.removeSession(a)).concat((n == null || (e = n.setMediaKeys(null)) == null ? void 0 : e.catch((a) => { this.log(`Could not clear media keys: ${a}`), this.hls && this.hls.trigger(S.ERROR, { type: fe.OTHER_ERROR, details: G.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR, @@ -34890,7 +34890,7 @@ class Hs extends ni { sessionKeys: t }) { if (!(!t || !this.config.emeEnabled) && !this.keyFormatPromise) { - const n = t.reduce((r, s) => (r.indexOf(s.keyFormat) === -1 && r.push(s.keyFormat), r), []); + const n = t.reduce((i, s) => (i.indexOf(s.keyFormat) === -1 && i.push(s.keyFormat), i), []); this.log(`Selecting key-system from session-keys ${n.join(", ")}`), this.keyFormatPromise = this.getKeyFormatPromise(n); } } @@ -34898,10 +34898,10 @@ class Hs extends ni { const { mediaKeysSession: t, licenseXhr: n, - decryptdata: r + decryptdata: i } = e; if (t) { - this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${Kt((r == null ? void 0 : r.keyId) || [])}`), e._onmessage && (t.removeEventListener("message", e._onmessage), e._onmessage = void 0), e._onkeystatuseschange && (t.removeEventListener("keystatuseschange", e._onkeystatuseschange), e._onkeystatuseschange = void 0), n && n.readyState !== XMLHttpRequest.DONE && n.abort(), e.mediaKeysSession = e.decryptdata = e.licenseXhr = void 0; + this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${Kt((i == null ? void 0 : i.keyId) || [])}`), e._onmessage && (t.removeEventListener("message", e._onmessage), e._onmessage = void 0), e._onkeystatuseschange && (t.removeEventListener("keystatuseschange", e._onkeystatuseschange), e._onkeystatuseschange = void 0), n && n.readyState !== XMLHttpRequest.DONE && n.abort(), e.mediaKeysSession = e.decryptdata = e.licenseXhr = void 0; const s = this.mediaKeySessions.indexOf(e); s > -1 && this.mediaKeySessions.splice(s, 1); const { @@ -34933,17 +34933,17 @@ class Hs extends ni { } } Hs.CDMCleanupPromise = void 0; -function qo(i) { - if (!i) +function qo(r) { + if (!r) throw new Error("Could not read keyId of undefined decryptdata"); - if (i.keyId === null) + if (r.keyId === null) throw new Error("keyId is null"); - return Kt(i.keyId); + return Kt(r.keyId); } -function c9(i, e) { - if (i.keyId && e.mediaKeysSession.keyStatuses.has(i.keyId)) - return e.mediaKeysSession.keyStatuses.get(i.keyId); - if (i.matches(e.decryptdata)) +function cw(r, e) { + if (r.keyId && e.mediaKeysSession.keyStatuses.has(r.keyId)) + return e.mediaKeysSession.keyStatuses.get(r.keyId); + if (r.matches(e.decryptdata)) return e.keyStatus; } class Dn extends Error { @@ -34951,16 +34951,16 @@ class Dn extends Error { super(t), this.data = void 0, e.error || (e.error = new Error(t)), this.data = e, e.err = e.error; } } -function M1(i, e) { - const t = i === "output-restricted", n = t ? G.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED : G.KEY_SYSTEM_STATUS_INTERNAL_ERROR; +function M1(r, e) { + const t = r === "output-restricted", n = t ? G.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED : G.KEY_SYSTEM_STATUS_INTERNAL_ERROR; return new Dn({ type: fe.KEY_SYSTEM_ERROR, details: n, fatal: !1, decryptdata: e - }, t ? "HDCP level output restricted" : `key status changed to "${i}"`); + }, t ? "HDCP level output restricted" : `key status changed to "${r}"`); } -class h9 { +class hw { constructor(e) { this.hls = void 0, this.isVideoPlaybackQualityAvailable = !1, this.timer = void 0, this.media = null, this.lastTime = void 0, this.lastDroppedFrames = 0, this.lastDecodedFrames = 0, this.streamController = void 0, this.hls = e, this.registerListeners(); } @@ -34979,18 +34979,18 @@ class h9 { onMediaAttaching(e, t) { const n = this.hls.config; if (n.capLevelOnFPSDrop) { - const r = t.media instanceof self.HTMLVideoElement ? t.media : null; - this.media = r, r && typeof r.getVideoPlaybackQuality == "function" && (this.isVideoPlaybackQualityAvailable = !0), self.clearInterval(this.timer), this.timer = self.setInterval(this.checkFPSInterval.bind(this), n.fpsDroppedMonitoringPeriod); + const i = t.media instanceof self.HTMLVideoElement ? t.media : null; + this.media = i, i && typeof i.getVideoPlaybackQuality == "function" && (this.isVideoPlaybackQualityAvailable = !0), self.clearInterval(this.timer), this.timer = self.setInterval(this.checkFPSInterval.bind(this), n.fpsDroppedMonitoringPeriod); } } onMediaDetaching() { this.media = null; } checkFPS(e, t, n) { - const r = performance.now(); + const i = performance.now(); if (t) { if (this.lastTime) { - const s = r - this.lastTime, a = n - this.lastDroppedFrames, o = t - this.lastDecodedFrames, l = 1e3 * a / s, u = this.hls; + const s = i - this.lastTime, a = n - this.lastDroppedFrames, o = t - this.lastDecodedFrames, l = 1e3 * a / s, u = this.hls; if (u.trigger(S.FPS_DROP, { currentDropped: a, currentDecoded: o, @@ -35003,7 +35003,7 @@ class h9 { }), u.autoLevelCapping = c, this.streamController.nextLevelSwitch()); } } - this.lastTime = r, this.lastDroppedFrames = n, this.lastDecodedFrames = t; + this.lastTime = i, this.lastDroppedFrames = n, this.lastDecodedFrames = t; } } checkFPSInterval() { @@ -35016,69 +35016,69 @@ class h9 { this.checkFPS(e, e.webkitDecodedFrameCount, e.webkitDroppedFrameCount); } } -function G2(i, e) { +function G2(r, e) { let t; try { t = new Event("addtrack"); } catch { t = document.createEvent("Event"), t.initEvent("addtrack", !1, !1); } - t.track = i, e.dispatchEvent(t); + t.track = r, e.dispatchEvent(t); } -function z2(i, e) { - const t = i.mode; - if (t === "disabled" && (i.mode = "hidden"), i.cues && !i.cues.getCueById(e.id)) +function z2(r, e) { + const t = r.mode; + if (t === "disabled" && (r.mode = "hidden"), r.cues && !r.cues.getCueById(e.id)) try { - if (i.addCue(e), !i.cues.getCueById(e.id)) + if (r.addCue(e), !r.cues.getCueById(e.id)) throw new Error(`addCue is failed for: ${e}`); } catch (n) { We.debug(`[texttrack-utils]: ${n}`); try { - const r = new self.TextTrackCue(e.startTime, e.endTime, e.text); - r.id = e.id, i.addCue(r); - } catch (r) { - We.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`); + const i = new self.TextTrackCue(e.startTime, e.endTime, e.text); + i.id = e.id, r.addCue(i); + } catch (i) { + We.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`); } } - t === "disabled" && (i.mode = t); + t === "disabled" && (r.mode = t); } -function Ms(i, e) { - const t = i.mode; - if (t === "disabled" && (i.mode = "hidden"), i.cues) - for (let n = i.cues.length; n--; ) - e && i.cues[n].removeEventListener("enter", e), i.removeCue(i.cues[n]); - t === "disabled" && (i.mode = t); +function Ms(r, e) { + const t = r.mode; + if (t === "disabled" && (r.mode = "hidden"), r.cues) + for (let n = r.cues.length; n--; ) + e && r.cues[n].removeEventListener("enter", e), r.removeCue(r.cues[n]); + t === "disabled" && (r.mode = t); } -function Wc(i, e, t, n) { - const r = i.mode; - if (r === "disabled" && (i.mode = "hidden"), i.cues && i.cues.length > 0) { - const s = f9(i.cues, e, t); +function Wc(r, e, t, n) { + const i = r.mode; + if (i === "disabled" && (r.mode = "hidden"), r.cues && r.cues.length > 0) { + const s = fw(r.cues, e, t); for (let a = 0; a < s.length; a++) - (!n || n(s[a])) && i.removeCue(s[a]); + (!n || n(s[a])) && r.removeCue(s[a]); } - r === "disabled" && (i.mode = r); + i === "disabled" && (r.mode = i); } -function d9(i, e) { - if (e <= i[0].startTime) +function dw(r, e) { + if (e <= r[0].startTime) return 0; - const t = i.length - 1; - if (e > i[t].endTime) + const t = r.length - 1; + if (e > r[t].endTime) return -1; - let n = 0, r = t, s; - for (; n <= r; ) - if (s = Math.floor((r + n) / 2), e < i[s].startTime) - r = s - 1; - else if (e > i[s].startTime && n < t) + let n = 0, i = t, s; + for (; n <= i; ) + if (s = Math.floor((i + n) / 2), e < r[s].startTime) + i = s - 1; + else if (e > r[s].startTime && n < t) n = s + 1; else return s; - return i[n].startTime - e < e - i[r].startTime ? n : r; + return r[n].startTime - e < e - r[i].startTime ? n : i; } -function f9(i, e, t) { - const n = [], r = d9(i, e); - if (r > -1) - for (let s = r, a = i.length; s < a; s++) { - const o = i[s]; +function fw(r, e, t) { + const n = [], i = dw(r, e); + if (i > -1) + for (let s = i, a = r.length; s < a; s++) { + const o = r[s]; if (o.startTime >= e && o.endTime <= t) n.push(o); else if (o.startTime > t) @@ -35086,15 +35086,15 @@ function f9(i, e, t) { } return n; } -function fl(i) { +function fl(r) { const e = []; - for (let t = 0; t < i.length; t++) { - const n = i[t]; - (n.kind === "subtitles" || n.kind === "captions") && n.label && e.push(i[t]); + for (let t = 0; t < r.length; t++) { + const n = r[t]; + (n.kind === "subtitles" || n.kind === "captions") && n.label && e.push(r[t]); } return e; } -class m9 extends ld { +class mw extends ld { constructor(e) { super(e, "subtitle-track-controller"), this.media = null, this.tracks = [], this.groupIds = null, this.tracksInGroup = [], this.trackId = -1, this.currentTrack = null, this.selectDefaultTrack = !0, this.queuedDefaultTrack = -1, this.useTextTrackPolling = !1, this.subtitlePollingInterval = -1, this._subtitleDisplay = !0, this.asyncPollTrackChange = () => this.pollTrackChange(0), this.onTextTracksChanged = () => { if (this.useTextTrackPolling || self.clearInterval(this.subtitlePollingInterval), !this.media || !this.hls.config.renderTextTracksNatively) @@ -35108,8 +35108,8 @@ class m9 extends ld { t = n[s]; break; } - const r = this.findTrackForTextTrack(t); - this.subtitleTrack !== r && this.setSubtitleTrack(r); + const i = this.findTrackForTextTrack(t); + this.subtitleTrack !== i && this.setSubtitleTrack(i); }, this.registerListeners(); } destroy() { @@ -35144,8 +35144,8 @@ class m9 extends ld { const n = this.media; if (!n) return; - const r = !!t.transferMedia; - if (self.clearInterval(this.subtitlePollingInterval), this.useTextTrackPolling || n.textTracks.removeEventListener("change", this.asyncPollTrackChange), this.trackId > -1 && (this.queuedDefaultTrack = this.trackId), this.subtitleTrack = -1, this.media = null, r) + const i = !!t.transferMedia; + if (self.clearInterval(this.subtitlePollingInterval), this.useTextTrackPolling || n.textTracks.removeEventListener("change", this.asyncPollTrackChange), this.trackId > -1 && (this.queuedDefaultTrack = this.trackId), this.subtitleTrack = -1, this.media = null, i) return; fl(n.textTracks).forEach((a) => { Ms(a); @@ -35161,15 +35161,15 @@ class m9 extends ld { onSubtitleTrackLoaded(e, t) { const { id: n, - groupId: r, + groupId: i, details: s } = t, a = this.tracksInGroup[n]; - if (!a || a.groupId !== r) { - this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${a == null ? void 0 : a.groupId}`); + if (!a || a.groupId !== i) { + this.warn(`Subtitle track with id:${n} and group:${i} not found in active group ${a == null ? void 0 : a.groupId}`); return; } const o = a.details; - a.details = t.details, this.log(`Subtitle track ${n} "${a.name}" lang:${a.lang} group:${r} loaded [${s.startSN}-${s.endSN}]`), n === this.trackId && this.playlistLoaded(n, t, o); + a.details = t.details, this.log(`Subtitle track ${n} "${a.name}" lang:${a.lang} group:${i} loaded [${s.startSN}-${s.endSN}]`), n === this.trackId && this.playlistLoaded(n, t, o); } onLevelLoading(e, t) { this.switchLevel(t.level); @@ -35181,9 +35181,9 @@ class m9 extends ld { const t = this.hls.levels[e]; if (!t) return; - const n = t.subtitleGroups || null, r = this.groupIds; + const n = t.subtitleGroups || null, i = this.groupIds; let s = this.currentTrack; - if (!n || (r == null ? void 0 : r.length) !== (n == null ? void 0 : n.length) || n != null && n.some((a) => (r == null ? void 0 : r.indexOf(a)) === -1)) { + if (!n || (i == null ? void 0 : i.length) !== (n == null ? void 0 : n.length) || n != null && n.some((a) => (i == null ? void 0 : i.indexOf(a)) === -1)) { this.groupIds = n, this.trackId = -1, this.currentTrack = null; const a = this.tracks.filter((c) => !n || n.indexOf(c.groupId) !== -1); if (a.length) @@ -35196,11 +35196,11 @@ class m9 extends ld { const o = this.hls.config.subtitlePreference; if (!s && o) { this.selectDefaultTrack = !1; - const c = Fi(o, a); + const c = Fr(o, a); if (c > -1) s = a[c]; else { - const h = Fi(o, this.tracks); + const h = Fr(o, this.tracks); s = this.tracks[h]; } } @@ -35214,21 +35214,21 @@ class m9 extends ld { } findTrackId(e) { const t = this.tracksInGroup, n = this.selectDefaultTrack; - for (let r = 0; r < t.length; r++) { - const s = t[r]; - if (!(n && !s.default || !n && !e) && (!e || Jr(s, e))) - return r; + for (let i = 0; i < t.length; i++) { + const s = t[i]; + if (!(n && !s.default || !n && !e) && (!e || Ji(s, e))) + return i; } if (e) { - for (let r = 0; r < t.length; r++) { - const s = t[r]; + for (let i = 0; i < t.length; i++) { + const s = t[i]; if (Xa(e.attrs, s.attrs, ["LANGUAGE", "ASSOC-LANGUAGE", "CHARACTERISTICS"])) - return r; + return i; } - for (let r = 0; r < t.length; r++) { - const s = t[r]; + for (let i = 0; i < t.length; i++) { + const s = t[i]; if (Xa(e.attrs, s.attrs, ["LANGUAGE"])) - return r; + return i; } } return -1; @@ -35237,8 +35237,8 @@ class m9 extends ld { if (e) { const t = this.tracksInGroup; for (let n = 0; n < t.length; n++) { - const r = t[n]; - if (qc(r, e)) + const i = t[n]; + if (qc(i, e)) return n; } } @@ -35268,17 +35268,17 @@ class m9 extends ld { const t = this.allSubtitleTracks; if (this.selectDefaultTrack = !1, t.length) { const n = this.currentTrack; - if (n && Jr(e, n)) + if (n && Ji(e, n)) return n; - const r = Fi(e, this.tracksInGroup); - if (r > -1) { - const s = this.tracksInGroup[r]; - return this.setSubtitleTrack(r), s; + const i = Fr(e, this.tracksInGroup); + if (i > -1) { + const s = this.tracksInGroup[i]; + return this.setSubtitleTrack(i), s; } else { if (n) return null; { - const s = Fi(e, t); + const s = Fr(e, t); if (s > -1) return t[s]; } @@ -35292,11 +35292,11 @@ class m9 extends ld { } loadingPlaylist(e, t) { super.loadingPlaylist(e, t); - const n = e.id, r = e.groupId, s = this.getUrlWithDirectives(e.url, t), a = e.details, o = a == null ? void 0 : a.age; - this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t == null ? void 0 : t.msn) !== void 0 ? " at sn " + t.msn + " part " + t.part : ""}${o && a.live ? " age " + o.toFixed(1) + (a.type && " " + a.type || "") : ""} ${s}`), this.hls.trigger(S.SUBTITLE_TRACK_LOADING, { + const n = e.id, i = e.groupId, s = this.getUrlWithDirectives(e.url, t), a = e.details, o = a == null ? void 0 : a.age; + this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${i}${(t == null ? void 0 : t.msn) !== void 0 ? " at sn " + t.msn + " part " + t.part : ""}${o && a.live ? " age " + o.toFixed(1) + (a.type && " " + a.type || "") : ""} ${s}`), this.hls.trigger(S.SUBTITLE_TRACK_LOADING, { url: s, id: n, - groupId: r, + groupId: i, deliveryDirectives: t || null, track: e }); @@ -35313,12 +35313,12 @@ class m9 extends ld { if (!e) return; const t = fl(e.textTracks), n = this.currentTrack; - let r; - if (n && (r = t.filter((s) => qc(n, s))[0], r || this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)), [].slice.call(t).forEach((s) => { - s.mode !== "disabled" && s !== r && (s.mode = "disabled"); - }), r) { + let i; + if (n && (i = t.filter((s) => qc(n, s))[0], i || this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)), [].slice.call(t).forEach((s) => { + s.mode !== "disabled" && s !== i && (s.mode = "disabled"); + }), i) { const s = this.subtitleDisplay ? "showing" : "hidden"; - r.mode !== s && (r.mode = s); + i.mode !== s && (i.mode = s); } } /** @@ -35336,24 +35336,24 @@ class m9 extends ld { return; } this.selectDefaultTrack = !1; - const n = this.currentTrack, r = t[e] || null; - if (this.trackId = e, this.currentTrack = r, this.toggleTrackModes(), !r) { + const n = this.currentTrack, i = t[e] || null; + if (this.trackId = e, this.currentTrack = i, this.toggleTrackModes(), !i) { this.hls.trigger(S.SUBTITLE_TRACK_SWITCH, { id: e }); return; } - const s = !!r.details && !r.details.live; - if (e === this.trackId && r === n && s) + const s = !!i.details && !i.details.live; + if (e === this.trackId && i === n && s) return; - this.log(`Switching to subtitle-track ${e}` + (r ? ` "${r.name}" lang:${r.lang} group:${r.groupId}` : "")); + this.log(`Switching to subtitle-track ${e}` + (i ? ` "${i.name}" lang:${i.lang} group:${i.groupId}` : "")); const { id: a, groupId: o = "", name: l, type: u, url: c - } = r; + } = i; this.hls.trigger(S.SUBTITLE_TRACK_SWITCH, { id: a, groupId: o, @@ -35361,11 +35361,11 @@ class m9 extends ld { type: u, url: c }); - const h = this.switchParams(r.url, n == null ? void 0 : n.details, r.details); + const h = this.switchParams(i.url, n == null ? void 0 : n.details, i.details); this.loadPlaylist(h); } } -function g9() { +function gw() { try { return crypto.randomUUID(); } catch { @@ -35374,27 +35374,27 @@ function g9() { return URL.revokeObjectURL(e), t.slice(t.lastIndexOf("/") + 1); } catch { let t = (/* @__PURE__ */ new Date()).getTime(); - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (i) => { const s = (t + Math.random() * 16) % 16 | 0; - return t = Math.floor(t / 16), (r == "x" ? s : s & 3 | 8).toString(16); + return t = Math.floor(t / 16), (i == "x" ? s : s & 3 | 8).toString(16); }); } } } -function Ca(i) { - let e = 5381, t = i.length; +function Ca(r) { + let e = 5381, t = r.length; for (; t; ) - e = e * 33 ^ i.charCodeAt(--t); + e = e * 33 ^ r.charCodeAt(--t); return (e >>> 0).toString(); } const Gs = 0.025; -let Wl = /* @__PURE__ */ function(i) { - return i[i.Point = 0] = "Point", i[i.Range = 1] = "Range", i; +let Wl = /* @__PURE__ */ function(r) { + return r[r.Point = 0] = "Point", r[r.Range = 1] = "Range", r; }({}); -function p9(i, e, t) { - return `${i.identifier}-${t + 1}-${Ca(e)}`; +function pw(r, e, t) { + return `${r.identifier}-${t + 1}-${Ca(e)}`; } -class _9 { +class _w { constructor(e, t) { this.base = void 0, this._duration = null, this._timelineStart = null, this.appendInPlaceDisabled = void 0, this.appendInPlaceStarted = void 0, this.dateRange = void 0, this.hasPlayed = !1, this.cumulativeDuration = 0, this.resumeOffset = NaN, this.playoutLimit = NaN, this.restrictions = { skip: !1, @@ -35513,35 +35513,35 @@ class _9 { return this.assetList.length > 0 || this.assetListResponse !== null; } toString() { - return v9(this); + return vw(this); } } -function Hu(i, e) { - return i - e.start < e.duration / 2 && !(Math.abs(i - (e.start + e.duration)) < Gs) ? e.start : e.start + e.duration; +function Hu(r, e) { + return r - e.start < e.duration / 2 && !(Math.abs(r - (e.start + e.duration)) < Gs) ? e.start : e.start + e.duration; } -function q2(i, e, t) { - const n = new self.URL(i, t); +function q2(r, e, t) { + const n = new self.URL(r, t); return n.protocol !== "data:" && n.searchParams.set("_HLS_primary_id", e), n; } -function Gu(i, e) { - for (; (t = i.assetList[++e]) != null && t.error; ) +function Gu(r, e) { + for (; (t = r.assetList[++e]) != null && t.error; ) var t; return e; } -function v9(i) { - return `["${i.identifier}" ${i.cue.pre ? "
" : i.cue.post ? "" : ""}${i.timelineStart.toFixed(2)}-${i.resumeTime.toFixed(2)}]`;
+function vw(r) {
+  return `["${r.identifier}" ${r.cue.pre ? "
" : r.cue.post ? "" : ""}${r.timelineStart.toFixed(2)}-${r.resumeTime.toFixed(2)}]`;
 }
-function Cs(i) {
-  const e = i.timelineStart, t = i.duration || 0;
-  return `["${i.identifier}" ${e.toFixed(2)}-${(e + t).toFixed(2)}]`;
+function Cs(r) {
+  const e = r.timelineStart, t = r.duration || 0;
+  return `["${r.identifier}" ${e.toFixed(2)}-${(e + t).toFixed(2)}]`;
 }
-class y9 {
-  constructor(e, t, n, r) {
+class yw {
+  constructor(e, t, n, i) {
     this.hls = void 0, this.interstitial = void 0, this.assetItem = void 0, this.tracks = null, this.hasDetails = !1, this.mediaAttached = null, this._currentTime = void 0, this._bufferedEosTime = void 0, this.checkPlayout = () => {
       this.reachedPlayout(this.currentTime) && this.hls && this.hls.trigger(S.PLAYOUT_LIMIT_REACHED, {});
     };
     const s = this.hls = new e(t);
-    this.interstitial = n, this.assetItem = r;
+    this.interstitial = n, this.assetItem = i;
     const a = () => {
       this.hasDetails = !0;
     };
@@ -35579,7 +35579,7 @@ class y9 {
       return !0;
     if (!e)
       return !1;
-    const n = Math.min(this._bufferedEosTime || 1 / 0, this.duration), r = this.timelineOffset, s = De.bufferInfo(e, r, 0);
+    const n = Math.min(this._bufferedEosTime || 1 / 0, this.duration), i = this.timelineOffset, s = De.bufferInfo(e, i, 0);
     return this.getAssetTime(s.end) >= n - 0.02;
   }
   reachedPlayout(e) {
@@ -35691,16 +35691,16 @@ class y9 {
     }
   }
   on(e, t, n) {
-    var r;
-    (r = this.hls) == null || r.on(e, t);
+    var i;
+    (i = this.hls) == null || i.on(e, t);
   }
   once(e, t, n) {
-    var r;
-    (r = this.hls) == null || r.once(e, t);
+    var i;
+    (i = this.hls) == null || i.once(e, t);
   }
   off(e, t, n) {
-    var r;
-    (r = this.hls) == null || r.off(e, t);
+    var i;
+    (i = this.hls) == null || i.off(e, t);
   }
   toString() {
     var e;
@@ -35708,7 +35708,7 @@ class y9 {
   }
 }
 const O1 = 0.033;
-class b9 extends ni {
+class bw extends nr {
   constructor(e, t) {
     super("interstitials-sched", t), this.onScheduleUpdate = void 0, this.eventMap = {}, this.events = null, this.items = null, this.durations = {
       primary: 0,
@@ -35723,7 +35723,7 @@ class b9 extends ni {
     this.eventMap = {}, this.setDurations(0, 0, 0), this.events && this.events.forEach((e) => e.reset()), this.events = this.items = null;
   }
   resetErrorsInRange(e, t) {
-    return this.events ? this.events.reduce((n, r) => e <= r.startOffset && t > r.startOffset ? (delete r.error, n + 1) : n, 0) : 0;
+    return this.events ? this.events.reduce((n, i) => e <= i.startOffset && t > i.startOffset ? (delete i.error, n + 1) : n, 0) : 0;
   }
   get duration() {
     const e = this.items;
@@ -35743,9 +35743,9 @@ class b9 extends ni {
       return this.findEventIndex(e.event.identifier);
     let n = -1;
     e.nextEvent ? n = this.findEventIndex(e.nextEvent.identifier) - 1 : e.previousEvent && (n = this.findEventIndex(e.previousEvent.identifier) + 1);
-    const r = this.items;
-    if (r)
-      for (r[n] || (t === void 0 && (t = e.start), n = this.findItemIndexAtTime(t)); n >= 0 && (s = r[n]) != null && s.event; ) {
+    const i = this.items;
+    if (i)
+      for (i[n] || (t === void 0 && (t = e.start), n = this.findItemIndexAtTime(t)); n >= 0 && (s = i[n]) != null && s.event; ) {
         var s;
         n--;
       }
@@ -35754,41 +35754,41 @@ class b9 extends ni {
   findItemIndexAtTime(e, t) {
     const n = this.items;
     if (n)
-      for (let r = 0; r < n.length; r++) {
-        let s = n[r];
+      for (let i = 0; i < n.length; i++) {
+        let s = n[i];
         if (t && t !== "primary" && (s = s[t]), e === s.start || e > s.start && e < s.end)
-          return r;
+          return i;
       }
     return -1;
   }
   findJumpRestrictedIndex(e, t) {
     const n = this.items;
     if (n)
-      for (let r = e; r <= t && n[r]; r++) {
-        const s = n[r].event;
+      for (let i = e; i <= t && n[i]; i++) {
+        const s = n[i].event;
         if (s != null && s.restrictions.jump && !s.appendInPlace)
-          return r;
+          return i;
       }
     return -1;
   }
   findEventIndex(e) {
     const t = this.items;
     if (t)
-      for (let r = t.length; r--; ) {
+      for (let i = t.length; i--; ) {
         var n;
-        if (((n = t[r].event) == null ? void 0 : n.identifier) === e)
-          return r;
+        if (((n = t[i].event) == null ? void 0 : n.identifier) === e)
+          return i;
       }
     return -1;
   }
   findAssetIndex(e, t) {
-    const n = e.assetList, r = n.length;
-    if (r > 1)
-      for (let s = 0; s < r; s++) {
+    const n = e.assetList, i = n.length;
+    if (i > 1)
+      for (let s = 0; s < i; s++) {
         const a = n[s];
         if (!a.error) {
           const o = a.timelineStart;
-          if (t === o || t > o && (t < o + (a.duration || 0) || s === r - 1))
+          if (t === o || t > o && (t < o + (a.duration || 0) || s === i - 1))
             return s;
         }
       }
@@ -35798,18 +35798,18 @@ class b9 extends ni {
     var e;
     const t = (e = this.items) == null || (e = e[this.length - 1]) == null ? void 0 : e.event;
     if (t) {
-      const n = t.assetList, r = n[n.length - 1];
-      if (r)
-        return r.identifier;
+      const n = t.assetList, i = n[n.length - 1];
+      if (i)
+        return i.identifier;
     }
     return null;
   }
   parseInterstitialDateRanges(e, t) {
     const n = e.main.details, {
-      dateRanges: r
-    } = n, s = this.events, a = this.parseDateRanges(r, {
+      dateRanges: i
+    } = n, s = this.events, a = this.parseDateRanges(i, {
       url: n.url
-    }, t), o = Object.keys(r), l = s ? s.filter((u) => !o.includes(u.identifier)) : [];
+    }, t), o = Object.keys(i), l = s ? s.filter((u) => !o.includes(u.identifier)) : [];
     a.length && a.sort((u, c) => {
       const h = u.cue.pre, d = u.cue.post, f = c.cue.pre, m = c.cue.post;
       if (h && !f)
@@ -35829,25 +35829,25 @@ class b9 extends ni {
     }), this.updateSchedule(e, l);
   }
   updateSchedule(e, t = [], n = !1) {
-    const r = this.events || [];
-    if (r.length || t.length || this.length < 2) {
-      const s = this.items, a = this.parseSchedule(r, e);
+    const i = this.events || [];
+    if (i.length || t.length || this.length < 2) {
+      const s = this.items, a = this.parseSchedule(i, e);
       (n || t.length || (s == null ? void 0 : s.length) !== a.length || a.some((l, u) => Math.abs(l.playout.start - s[u].playout.start) > 5e-3 || Math.abs(l.playout.end - s[u].playout.end) > 5e-3)) && (this.items = a, this.onScheduleUpdate(t, s));
     }
   }
   parseDateRanges(e, t, n) {
-    const r = [], s = Object.keys(e);
+    const i = [], s = Object.keys(e);
     for (let a = 0; a < s.length; a++) {
       const o = s[a], l = e[o];
       if (l.isInterstitial) {
         let u = this.eventMap[o];
-        u ? u.setDateRange(l) : (u = new _9(l, t), this.eventMap[o] = u, n === !1 && (u.appendInPlace = n)), r.push(u);
+        u ? u.setDateRange(l) : (u = new _w(l, t), this.eventMap[o] = u, n === !1 && (u.appendInPlace = n)), i.push(u);
       }
     }
-    return r;
+    return i;
   }
   parseSchedule(e, t) {
-    const n = [], r = t.main.details, s = r.live ? 1 / 0 : r.edge;
+    const n = [], i = t.main.details, s = i.live ? 1 / 0 : i.edge;
     let a = 0;
     if (e = e.filter((l) => !l.error && !(l.cue.once && l.hasPlayed)), e.length) {
       this.resolveOffsets(e, t);
@@ -35964,18 +35964,18 @@ class b9 extends ni {
     };
   }
   resolveOffsets(e, t) {
-    const n = t.main.details, r = n.live ? 1 / 0 : n.edge;
+    const n = t.main.details, i = n.live ? 1 / 0 : n.edge;
     let s = 0, a = -1;
     e.forEach((o, l) => {
-      const u = o.cue.pre, c = o.cue.post, h = u ? 0 : c ? r : o.startTime;
+      const u = o.cue.pre, c = o.cue.post, h = u ? 0 : c ? i : o.startTime;
       this.updateAssetDurations(o), a === h ? o.cumulativeDuration = s : (s = 0, a = h), !c && o.snapOptions.in && (o.resumeAnchor = os(null, n.fragments, o.startOffset + o.resumptionOffset, 0, 0) || void 0), o.appendInPlace && !o.appendInPlaceStarted && (this.primaryCanResumeInPlaceAt(o, t) || (o.appendInPlace = !1)), !o.appendInPlace && l + 1 < e.length && e[l + 1].startTime - e[l].resumeTime < O1 && (e[l + 1].appendInPlace = !1, e[l + 1].appendInPlace && this.warn(`Could not change append strategy for abutting event ${o}`));
       const f = oe(o.resumeOffset) ? o.resumeOffset : o.duration;
       s += f;
     });
   }
   primaryCanResumeInPlaceAt(e, t) {
-    const n = e.resumeTime, r = e.startTime + e.resumptionOffset;
-    return Math.abs(n - r) > Gs ? (this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`), !1) : !Object.keys(t).some((a) => {
+    const n = e.resumeTime, i = e.startTime + e.resumptionOffset;
+    return Math.abs(n - i) > Gs ? (this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${i}`), !1) : !Object.keys(t).some((a) => {
       const o = t[a].details, l = o.edge;
       if (n >= l)
         return this.log(`"${e.identifier}" resumption ${n} past ${a} playlist end ${l}`), !1;
@@ -35990,23 +35990,23 @@ class b9 extends ni {
     if (!e.assetListLoaded)
       return;
     const t = e.timelineStart;
-    let n = 0, r = !1, s = !1;
+    let n = 0, i = !1, s = !1;
     for (let a = 0; a < e.assetList.length; a++) {
       const o = e.assetList[a], l = t + n;
-      o.startOffset = n, o.timelineStart = l, r || (r = o.duration === null), s || (s = !!o.error);
+      o.startOffset = n, o.timelineStart = l, i || (i = o.duration === null), s || (s = !!o.error);
       const u = o.error ? 0 : o.duration || 0;
       n += u;
     }
-    r && !s ? e.duration = Math.max(n, e.duration) : e.duration = n;
+    i && !s ? e.duration = Math.max(n, e.duration) : e.duration = n;
   }
   removeEvent(e) {
     e.reset(), delete this.eventMap[e.identifier];
   }
 }
-function oi(i) {
-  return `[${i.event ? '"' + i.event.identifier + '"' : "primary"}: ${i.start.toFixed(2)}-${i.end.toFixed(2)}]`;
+function or(r) {
+  return `[${r.event ? '"' + r.event.identifier + '"' : "primary"}: ${r.start.toFixed(2)}-${r.end.toFixed(2)}]`;
 }
-class E9 {
+class Ew {
   constructor(e) {
     this.hls = void 0, this.hls = e;
   }
@@ -36015,18 +36015,18 @@ class E9 {
   }
   loadAssetList(e, t) {
     const n = e.assetListUrl;
-    let r;
+    let i;
     try {
-      r = q2(n, this.hls.sessionId, e.baseUrl);
+      i = q2(n, this.hls.sessionId, e.baseUrl);
     } catch (d) {
       const f = this.assignAssetListError(e, G.ASSET_LIST_LOAD_ERROR, d, n);
       this.hls.trigger(S.ERROR, f);
       return;
     }
-    t && r.protocol !== "data:" && r.searchParams.set("_HLS_start_offset", "" + t);
+    t && i.protocol !== "data:" && i.searchParams.set("_HLS_start_offset", "" + t);
     const s = this.hls.config, a = s.loader, o = new a(s), l = {
       responseType: "json",
-      url: r.href
+      url: i.href
     }, u = s.interstitialAssetListLoadPolicy.default, c = {
       loadPolicy: u,
       timeout: u.maxLoadTimeMs,
@@ -36060,28 +36060,28 @@ class E9 {
       event: e
     }), o;
   }
-  assignAssetListError(e, t, n, r, s, a) {
+  assignAssetListError(e, t, n, i, s, a) {
     return e.error = n, {
       type: fe.NETWORK_ERROR,
       details: t,
       fatal: !1,
       interstitial: e,
-      url: r,
+      url: i,
       error: n,
       networkDetails: a,
       stats: s
     };
   }
 }
-function B1(i) {
+function B1(r) {
   var e;
-  i == null || (e = i.play()) == null || e.catch(() => {
+  r == null || (e = r.play()) == null || e.catch(() => {
   });
 }
-function Vo(i, e) {
-  return `[${i}] Advancing timeline position to ${e}`;
+function Vo(r, e) {
+  return `[${r}] Advancing timeline position to ${e}`;
 }
-class S9 extends ni {
+class Sw extends nr {
   constructor(e, t) {
     super("interstitials", e.logger), this.HlsPlayerClass = void 0, this.hls = void 0, this.assetListLoader = void 0, this.mediaSelection = null, this.altSelection = null, this.media = null, this.detachedData = null, this.requiredTracks = null, this.manager = null, this.playerQueue = [], this.bufferedPos = -1, this.timelinePos = -1, this.schedule = void 0, this.playingItem = null, this.bufferingItem = null, this.waitingItem = null, this.endedItem = null, this.playingAsset = null, this.endedAsset = null, this.bufferingAsset = null, this.shouldPlay = !1, this.onPlay = () => {
       this.shouldPlay = !0;
@@ -36091,17 +36091,17 @@ class S9 extends ni {
       const n = this.currentTime;
       if (n === void 0 || this.playbackDisabled || !this.schedule)
         return;
-      const r = n - this.timelinePos;
-      if (Math.abs(r) < 1 / 7056e5)
+      const i = n - this.timelinePos;
+      if (Math.abs(i) < 1 / 7056e5)
         return;
-      const a = r <= -0.01;
+      const a = i <= -0.01;
       this.timelinePos = n, this.bufferedPos = n;
       const o = this.playingItem;
       if (!o) {
         this.checkBuffer();
         return;
       }
-      if (a && this.schedule.resetErrorsInRange(n, n - r) && this.updateSchedule(!0), this.checkBuffer(), a && n < o.start || n >= o.end) {
+      if (a && this.schedule.resetErrorsInRange(n, n - i) && this.updateSchedule(!0), this.checkBuffer(), a && n < o.start || n >= o.end) {
         var l;
         const f = this.findItemIndex(o);
         let m = this.schedule.findItemIndexAtTime(n);
@@ -36136,12 +36136,12 @@ class S9 extends ni {
         this.timelinePos = n, n > this.bufferedPos && this.checkBuffer();
       else
         return;
-      const r = this.playingItem;
-      if (!r || this.playingLastItem)
+      const i = this.playingItem;
+      if (!i || this.playingLastItem)
         return;
-      if (n >= r.end) {
-        this.timelinePos = r.end;
-        const o = this.findItemIndex(r);
+      if (n >= i.end) {
+        this.timelinePos = i.end;
+        const o = this.findItemIndex(i);
         this.setSchedulePosition(o + 1);
       }
       const s = this.playingAsset;
@@ -36149,13 +36149,13 @@ class S9 extends ni {
         return;
       const a = s.timelineStart + (s.duration || 0);
       n >= a && this.setScheduleToAssetAtTime(n, s);
-    }, this.onScheduleUpdate = (n, r) => {
+    }, this.onScheduleUpdate = (n, i) => {
       const s = this.schedule;
       if (!s)
         return;
       const a = this.playingItem, o = s.events || [], l = s.items || [], u = s.durations, c = n.map((g) => g.identifier), h = !!(o.length || c.length);
-      (h || r) && this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
-Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.log(`Removed events ${c}`);
+      (h || i) && this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
+Schedule: ${l.map((g) => or(g))} pos: ${this.timelinePos}`), c.length && this.log(`Removed events ${c}`);
       let d = null, f = null;
       a && (d = this.updateItem(a, this.timelinePos), this.itemsMatch(a, d) ? this.playingItem = d : this.waitingItem = this.endedItem = null), this.waitingItem = this.updateItem(this.waitingItem), this.endedItem = this.updateItem(this.endedItem);
       const m = this.bufferingItem;
@@ -36173,7 +36173,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
               Math.abs(b) > Gs && this.warn(`${y} ("${g.assetId}" ${g.timelineOffset}->${p})`);
             }
         }
-      }), h || r) {
+      }), h || i) {
         if (this.hls.trigger(S.INTERSTITIALS_UPDATED, {
           events: o.slice(0),
           schedule: l.slice(0),
@@ -36185,7 +36185,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         }
         a && this.trimInPlace(d, a), m && f !== d && this.trimInPlace(f, m), this.checkBuffer();
       }
-    }, this.hls = e, this.HlsPlayerClass = t, this.assetListLoader = new E9(e), this.schedule = new b9(this.onScheduleUpdate, e.logger), this.registerListeners();
+    }, this.hls = e, this.HlsPlayerClass = t, this.assetListLoader = new Ew(e), this.schedule = new bw(this.onScheduleUpdate, e.logger), this.registerListeners();
   }
   registerListeners() {
     const e = this.hls;
@@ -36224,10 +36224,10 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     fn(n, "seeking", this.onSeeking), fn(n, "timeupdate", this.onTimeupdate), fn(n, "play", this.onPlay), fn(n, "pause", this.onPause);
   }
   onMediaAttached(e, t) {
-    const n = this.effectivePlayingItem, r = this.detachedData;
+    const n = this.effectivePlayingItem, i = this.detachedData;
     if (this.detachedData = null, n === null)
       this.checkStart();
-    else if (!r) {
+    else if (!i) {
       this.clearScheduleState();
       const s = this.findItemIndex(n);
       this.setSchedulePosition(s);
@@ -36237,8 +36237,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     this.log("clear schedule state"), this.playingItem = this.bufferingItem = this.waitingItem = this.endedItem = this.playingAsset = this.endedAsset = this.bufferingAsset = null;
   }
   onMediaDetaching(e, t) {
-    const n = !!t.transferMedia, r = this.media;
-    if (this.media = null, !n && (r && this.removeMediaListeners(r), this.detachedData)) {
+    const n = !!t.transferMedia, i = this.media;
+    if (this.media = null, !n && (i && this.removeMediaListeners(i), this.detachedData)) {
       const s = this.getBufferingPlayer();
       s && (this.log(`Removing schedule state for detachedData and ${s}`), this.playingAsset = this.endedAsset = this.bufferingAsset = this.bufferingItem = this.waitingItem = this.detachedData = null, s.detachMedia()), this.shouldPlay = !1;
     }
@@ -36248,7 +36248,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       return null;
     if (this.manager)
       return this.manager;
-    const e = this, t = () => e.bufferingItem || e.waitingItem, n = (h) => h && e.getAssetPlayer(h.identifier), r = (h, d, f, m, g) => {
+    const e = this, t = () => e.bufferingItem || e.waitingItem, n = (h) => h && e.getAssetPlayer(h.identifier), i = (h, d, f, m, g) => {
       if (h) {
         let p = h[d].start;
         const b = h.event;
@@ -36291,7 +36291,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       if (p && (A || w)) {
         const D = n(e.playingAsset), L = (D == null ? void 0 : D.media) || e.primaryMedia;
         if (L) {
-          const I = d === "primary" ? L.currentTime : r(p, d, e.playingAsset, "timelinePos", "currentTime"), R = h - I, M = (A ? I : L.currentTime) + R;
+          const I = d === "primary" ? L.currentTime : i(p, d, e.playingAsset, "timelinePos", "currentTime"), R = h - I, M = (A ? I : L.currentTime) + R;
           if (M >= 0 && (!D || A || M <= D.duration)) {
             L.currentTime = M;
             return;
@@ -36344,13 +36344,13 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         const h = t(), d = e.bufferingItem;
         if (d && d === h) {
           var f;
-          return r(d, "playout", e.bufferingAsset, "bufferedPos", "bufferedEnd") - d.playout.start || ((f = e.bufferingAsset) == null ? void 0 : f.startOffset) || 0;
+          return i(d, "playout", e.bufferingAsset, "bufferedPos", "bufferedEnd") - d.playout.start || ((f = e.bufferingAsset) == null ? void 0 : f.startOffset) || 0;
         }
         return 0;
       },
       get currentTime() {
         const h = u(), d = e.effectivePlayingItem;
-        return d && d === h ? r(d, "playout", e.effectivePlayingAsset, "timelinePos", "currentTime") - d.playout.start : 0;
+        return d && d === h ? i(d, "playout", e.effectivePlayingAsset, "timelinePos", "currentTime") - d.playout.start : 0;
       },
       set currentTime(h) {
         const d = u(), f = e.effectivePlayingItem;
@@ -36430,10 +36430,10 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       },
       integrated: {
         get bufferedEnd() {
-          return r(t(), "integrated", e.bufferingAsset, "bufferedPos", "bufferedEnd");
+          return i(t(), "integrated", e.bufferingAsset, "bufferedPos", "bufferedEnd");
         },
         get currentTime() {
-          return r(e.effectivePlayingItem, "integrated", e.effectivePlayingAsset, "timelinePos", "currentTime");
+          return i(e.effectivePlayingItem, "integrated", e.effectivePlayingAsset, "timelinePos", "currentTime");
         },
         set currentTime(h) {
           l(h, "integrated");
@@ -36482,9 +36482,9 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const n = this.waitingItem || this.playingItem;
     if (this.isInterstitial(n) && !n.event.appendInPlace)
       return;
-    let r = this.media;
-    !r && (e = this.bufferingItem) != null && (e = e.event) != null && e.appendInPlace && (r = this.primaryMedia);
-    const s = (t = r) == null ? void 0 : t.currentTime;
+    let i = this.media;
+    !i && (e = this.bufferingItem) != null && (e = e.event) != null && e.appendInPlace && (i = this.primaryMedia);
+    const s = (t = i) == null ? void 0 : t.currentTime;
     if (!(s === void 0 || !oe(s)))
       return s;
   }
@@ -36500,20 +36500,20 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     n && this.transferMediaFromPlayer(n, t);
   }
   transferMediaFromPlayer(e, t) {
-    const n = e.interstitial.appendInPlace, r = e.media;
-    if (n && r === this.primaryMedia) {
-      if (this.bufferingAsset = null, (!t || this.isInterstitial(t) && !t.event.appendInPlace) && t && r) {
+    const n = e.interstitial.appendInPlace, i = e.media;
+    if (n && i === this.primaryMedia) {
+      if (this.bufferingAsset = null, (!t || this.isInterstitial(t) && !t.event.appendInPlace) && t && i) {
         this.detachedData = {
-          media: r
+          media: i
         };
         return;
       }
       const s = e.transferMedia();
       this.log(`transfer MediaSource from ${e} ${et(s)}`), this.detachedData = s;
-    } else t && r && (this.shouldPlay || (this.shouldPlay = !r.paused));
+    } else t && i && (this.shouldPlay || (this.shouldPlay = !i.paused));
   }
   transferMediaTo(e, t) {
-    var n, r;
+    var n, i;
     if (e.media === t)
       return;
     let s = null;
@@ -36541,7 +36541,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         };
       }
     }
-    const h = s && "mediaSource" in s && ((r = s.mediaSource) == null ? void 0 : r.readyState) !== "closed", d = h && s ? s : t;
+    const h = s && "mediaSource" in s && ((i = s.mediaSource) == null ? void 0 : i.readyState) !== "closed", d = h && s ? s : t;
     this.log(`${h ? "transfering MediaSource" : "attaching media"} to ${o ? e : "Primary"} from ${c} (media.currentTime: ${t.currentTime})`);
     const f = this.schedule;
     if (d === s && f) {
@@ -36563,7 +36563,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     if (!t || this.playbackDisabled || !this.media)
       return;
     this.bufferedPos === -1 && (this.bufferedPos = 0);
-    const n = this.timelinePos, r = this.effectivePlayingItem;
+    const n = this.timelinePos, i = this.effectivePlayingItem;
     if (n === -1) {
       const s = this.hls.startPosition;
       if (this.log(Vo("checkStart", s)), this.timelinePos = s, t.length && t[0].cue.pre) {
@@ -36573,13 +36573,13 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         const a = this.timelinePos = s > 0 ? s : 0, o = e.findItemIndexAtTime(a);
         this.setSchedulePosition(o);
       }
-    } else if (r && !this.playingItem) {
-      const s = e.findItemIndex(r);
+    } else if (i && !this.playingItem) {
+      const s = e.findItemIndex(i);
       this.setSchedulePosition(s);
     }
   }
   advanceAssetBuffering(e, t) {
-    const n = e.event, r = n.findAssetIndex(t), s = Gu(n, r);
+    const n = e.event, i = n.findAssetIndex(t), s = Gu(n, i);
     if (!n.isAssetPastPlayoutLimit(s))
       this.bufferedToEvent(e, s);
     else if (this.schedule) {
@@ -36589,8 +36589,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     }
   }
   advanceAfterAssetEnded(e, t, n) {
-    const r = Gu(e, n);
-    if (e.isAssetPastPlayoutLimit(r)) {
+    const i = Gu(e, n);
+    if (e.isAssetPastPlayoutLimit(i)) {
       if (this.schedule) {
         const s = this.schedule.items;
         if (s) {
@@ -36605,29 +36605,29 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       }
     } else {
       if (e.appendInPlace) {
-        const s = e.assetList[r];
+        const s = e.assetList[i];
         s && this.advanceInPlace(s.timelineStart);
       }
-      this.setSchedulePosition(t, r);
+      this.setSchedulePosition(t, i);
     }
   }
   setScheduleToAssetAtTime(e, t) {
     const n = this.schedule;
     if (!n)
       return;
-    const r = t.parentIdentifier, s = n.getEvent(r);
+    const i = t.parentIdentifier, s = n.getEvent(i);
     if (s) {
-      const a = n.findEventIndex(r), o = n.findAssetIndex(s, e);
+      const a = n.findEventIndex(i), o = n.findAssetIndex(s, e);
       this.advanceAfterAssetEnded(s, a, o - 1);
     }
   }
   setSchedulePosition(e, t) {
     var n;
-    const r = (n = this.schedule) == null ? void 0 : n.items;
-    if (!r || this.playbackDisabled)
+    const i = (n = this.schedule) == null ? void 0 : n.items;
+    if (!i || this.playbackDisabled)
       return;
-    const s = e >= 0 ? r[e] : null;
-    this.log(`setSchedulePosition ${e}, ${t} (${s && oi(s)}) pos: ${this.timelinePos}`);
+    const s = e >= 0 ? i[e] : null;
+    this.log(`setSchedulePosition ${e}, ${t} (${s && or(s)}) pos: ${this.timelinePos}`);
     const a = this.waitingItem || this.playingItem, o = this.playingLastItem;
     if (this.isInterstitial(a)) {
       const c = a.event, h = this.playingAsset, d = h == null ? void 0 : h.identifier, f = d ? this.getAssetPlayer(d) : null;
@@ -36638,7 +36638,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
           asset: h,
           assetListIndex: m,
           event: c,
-          schedule: r.slice(0),
+          schedule: i.slice(0),
           scheduleIndex: e,
           player: f
         }), a !== this.playingItem) {
@@ -36648,9 +36648,9 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         }
         this.retreiveMediaSource(d, s), f.media && !((l = this.detachedData) != null && l.mediaSource) && f.detachMedia();
       }
-      if (!this.eventItemsMatch(a, s) && (this.endedItem = a, this.playingItem = null, this.log(`INTERSTITIAL_ENDED ${c} ${oi(a)}`), c.hasPlayed = !0, this.hls.trigger(S.INTERSTITIAL_ENDED, {
+      if (!this.eventItemsMatch(a, s) && (this.endedItem = a, this.playingItem = null, this.log(`INTERSTITIAL_ENDED ${c} ${or(a)}`), c.hasPlayed = !0, this.hls.trigger(S.INTERSTITIAL_ENDED, {
         event: c,
-        schedule: r.slice(0),
+        schedule: i.slice(0),
         scheduleIndex: e
       }), c.cue.once)) {
         var u;
@@ -36663,9 +36663,9 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         return;
       }
     }
-    this.advanceSchedule(e, r, t, a, o);
+    this.advanceSchedule(e, i, t, a, o);
   }
-  advanceSchedule(e, t, n, r, s) {
+  advanceSchedule(e, t, n, i, s) {
     const a = this.schedule;
     if (!a)
       return;
@@ -36688,7 +36688,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       const h = this.waitingItem;
       this.assetsBuffered(o, l) || this.setBufferingItem(o);
       let d = this.preloadAssets(c, n);
-      if (this.eventItemsMatch(o, h || r) || (this.waitingItem = o, this.log(`INTERSTITIAL_STARTED ${oi(o)} ${c.appendInPlace ? "append in place" : ""}`), this.hls.trigger(S.INTERSTITIAL_STARTED, {
+      if (this.eventItemsMatch(o, h || i) || (this.waitingItem = o, this.log(`INTERSTITIAL_STARTED ${or(o)} ${c.appendInPlace ? "append in place" : ""}`), this.hls.trigger(S.INTERSTITIAL_STARTED, {
         event: c,
         schedule: t.slice(0),
         scheduleIndex: e
@@ -36713,7 +36713,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       if (!this.eventItemsMatch(o, this.bufferingItem) && c.appendInPlace && this.isAssetBuffered(f))
         return;
       this.startAssetPlayer(d, n, t, e, l), this.shouldPlay && B1(d.media);
-    } else o ? (this.resumePrimary(o, e, r), this.shouldPlay && B1(this.hls.media)) : s && this.isInterstitial(r) && (this.endedItem = null, this.playingItem = r, r.event.appendInPlace || this.attachPrimary(a.durations.primary, null));
+    } else o ? (this.resumePrimary(o, e, i), this.shouldPlay && B1(this.hls.media)) : s && this.isInterstitial(i) && (this.endedItem = null, this.playingItem = i, i.event.appendInPlace || this.attachPrimary(a.durations.primary, null));
   }
   get playbackDisabled() {
     return this.hls.config.enableInterstitialPlayback === !1;
@@ -36727,15 +36727,15 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     return !!((e = this.primaryDetails) != null && e.live);
   }
   resumePrimary(e, t, n) {
-    var r, s;
-    if (this.playingItem = e, this.playingAsset = this.endedAsset = null, this.waitingItem = this.endedItem = null, this.bufferedToItem(e), this.log(`resuming ${oi(e)}`), !((r = this.detachedData) != null && r.mediaSource)) {
+    var i, s;
+    if (this.playingItem = e, this.playingAsset = this.endedAsset = null, this.waitingItem = this.endedItem = null, this.bufferedToItem(e), this.log(`resuming ${or(e)}`), !((i = this.detachedData) != null && i.mediaSource)) {
       let o = this.timelinePos;
       (o < e.start || o >= e.end) && (o = this.getPrimaryResumption(e, t), this.log(Vo("resumePrimary", o)), this.timelinePos = o), this.attachPrimary(o, e);
     }
     if (!n)
       return;
     const a = (s = this.schedule) == null ? void 0 : s.items;
-    a && (this.log(`INTERSTITIALS_PRIMARY_RESUMED ${oi(e)}`), this.hls.trigger(S.INTERSTITIALS_PRIMARY_RESUMED, {
+    a && (this.log(`INTERSTITIALS_PRIMARY_RESUMED ${or(e)}`), this.hls.trigger(S.INTERSTITIALS_PRIMARY_RESUMED, {
       schedule: a.slice(0),
       scheduleIndex: t
     }), this.checkBuffer());
@@ -36743,10 +36743,10 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   getPrimaryResumption(e, t) {
     const n = e.start;
     if (this.primaryLive) {
-      const r = this.primaryDetails;
+      const i = this.primaryDetails;
       if (t === 0)
         return this.hls.startPosition;
-      if (r && (n < r.fragmentStart || n > r.edge))
+      if (i && (n < i.fragmentStart || n > i.edge))
         return this.hls.liveSyncPosition || -1;
     }
     return n;
@@ -36757,16 +36757,16 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   }
   attachPrimary(e, t, n) {
     t ? this.setBufferingItem(t) : this.bufferingItem = this.playingItem, this.bufferingAsset = null;
-    const r = this.primaryMedia;
-    if (!r)
+    const i = this.primaryMedia;
+    if (!i)
       return;
     const s = this.hls;
-    s.media ? this.checkBuffer() : (this.transferMediaTo(s, r), n && this.startLoadingPrimaryAt(e, n)), n || (this.log(Vo("attachPrimary", e)), this.timelinePos = e, this.startLoadingPrimaryAt(e, n));
+    s.media ? this.checkBuffer() : (this.transferMediaTo(s, i), n && this.startLoadingPrimaryAt(e, n)), n || (this.log(Vo("attachPrimary", e)), this.timelinePos = e, this.startLoadingPrimaryAt(e, n));
   }
   startLoadingPrimaryAt(e, t) {
     var n;
-    const r = this.hls;
-    !r.loadingEnabled || !r.media || Math.abs((((n = r.mainForwardBufferInfo) == null ? void 0 : n.start) || r.media.currentTime) - e) > 0.5 ? r.startLoad(e, t) : r.bufferingEnabled || r.resumeBuffering();
+    const i = this.hls;
+    !i.loadingEnabled || !i.media || Math.abs((((n = i.mainForwardBufferInfo) == null ? void 0 : n.start) || i.media.currentTime) - e) > 0.5 ? i.startLoad(e, t) : i.bufferingEnabled || i.resumeBuffering();
   }
   // HLS.js event callbacks
   onManifestLoading() {
@@ -36779,33 +36779,33 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const n = this.hls.levels[t.level];
     if (!n.details)
       return;
-    const r = je(je({}, this.mediaSelection || this.altSelection), {}, {
+    const i = je(je({}, this.mediaSelection || this.altSelection), {}, {
       main: n
     });
-    this.mediaSelection = r, this.schedule.parseInterstitialDateRanges(r, this.hls.config.interstitialAppendInPlace), !this.effectivePlayingItem && this.schedule.items && this.checkStart();
+    this.mediaSelection = i, this.schedule.parseInterstitialDateRanges(i, this.hls.config.interstitialAppendInPlace), !this.effectivePlayingItem && this.schedule.items && this.checkStart();
   }
   onAudioTrackUpdated(e, t) {
-    const n = this.hls.audioTracks[t.id], r = this.mediaSelection;
-    if (!r) {
+    const n = this.hls.audioTracks[t.id], i = this.mediaSelection;
+    if (!i) {
       this.altSelection = je(je({}, this.altSelection), {}, {
         audio: n
       });
       return;
     }
-    const s = je(je({}, r), {}, {
+    const s = je(je({}, i), {}, {
       audio: n
     });
     this.mediaSelection = s;
   }
   onSubtitleTrackUpdated(e, t) {
-    const n = this.hls.subtitleTracks[t.id], r = this.mediaSelection;
-    if (!r) {
+    const n = this.hls.subtitleTracks[t.id], i = this.mediaSelection;
+    if (!i) {
       this.altSelection = je(je({}, this.altSelection), {}, {
         subtitles: n
       });
       return;
     }
-    const s = je(je({}, r), {}, {
+    const s = je(je({}, i), {}, {
       subtitles: n
     });
     this.mediaSelection = s;
@@ -36813,14 +36813,14 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   onAudioTrackSwitching(e, t) {
     const n = Km(t);
     this.playerQueue.forEach(({
-      hls: r
-    }) => r && (r.setAudioOption(t) || r.setAudioOption(n)));
+      hls: i
+    }) => i && (i.setAudioOption(t) || i.setAudioOption(n)));
   }
   onSubtitleTrackSwitch(e, t) {
     const n = Km(t);
     this.playerQueue.forEach(({
-      hls: r
-    }) => r && (r.setSubtitleOption(t) || t.id !== -1 && r.setSubtitleOption(n)));
+      hls: i
+    }) => i && (i.setSubtitleOption(t) || t.id !== -1 && i.setSubtitleOption(n)));
   }
   onBufferCodecs(e, t) {
     const n = t.tracks;
@@ -36832,8 +36832,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   onBufferFlushed(e, t) {
     const n = this.playingItem;
     if (n && !this.itemsMatch(n, this.bufferingItem) && !this.isInterstitial(n)) {
-      const r = this.timelinePos;
-      this.bufferedPos = r, this.checkBuffer();
+      const i = this.timelinePos;
+      this.bufferedPos = i, this.checkBuffer();
     }
   }
   onBufferedToEnd(e) {
@@ -36841,8 +36841,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       return;
     const t = this.schedule.events;
     if (this.bufferedPos < Number.MAX_VALUE && t) {
-      for (let r = 0; r < t.length; r++) {
-        const s = t[r];
+      for (let i = 0; i < t.length; i++) {
+        const s = t[i];
         if (s.cue.post) {
           var n;
           const a = this.schedule.findEventIndex(s.identifier), o = (n = this.schedule.items) == null ? void 0 : n[a];
@@ -36863,10 +36863,10 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   }
   updateItem(e, t) {
     var n;
-    const r = (n = this.schedule) == null ? void 0 : n.items;
-    if (e && r) {
+    const i = (n = this.schedule) == null ? void 0 : n.items;
+    if (e && i) {
       const s = this.findItemIndex(e, t);
-      return r[s] || null;
+      return i[s] || null;
     }
     return null;
   }
@@ -36875,8 +36875,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       e.event.assetList.forEach((s, a) => {
         e.event.isAssetPastPlayoutLimit(a) && this.clearAssetPlayer(s.identifier, null);
       });
-      const n = e.end + 0.25, r = De.bufferInfo(this.primaryMedia, n, 0);
-      (r.end > n || (r.nextStart || 0) > n) && (this.log(`trim buffered interstitial ${oi(e)} (was ${oi(t)})`), this.attachPrimary(n, null, !0), this.flushFrontBuffer(n));
+      const n = e.end + 0.25, i = De.bufferInfo(this.primaryMedia, n, 0);
+      (i.end > n || (i.nextStart || 0) > n) && (this.log(`trim buffered interstitial ${or(e)} (was ${or(t)})`), this.attachPrimary(n, null, !0), this.flushFrontBuffer(n));
     }
   }
   itemsMatch(e, t) {
@@ -36900,19 +36900,19 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const n = (t = this.schedule) == null ? void 0 : t.items;
     if (!n)
       return;
-    const r = De.bufferInfo(this.primaryMedia, this.timelinePos, 0);
-    e && (this.bufferedPos = this.timelinePos), e || (e = r.len < 1), this.updateBufferedPos(r.end, n, e);
+    const i = De.bufferInfo(this.primaryMedia, this.timelinePos, 0);
+    e && (this.bufferedPos = this.timelinePos), e || (e = i.len < 1), this.updateBufferedPos(i.end, n, e);
   }
   updateBufferedPos(e, t, n) {
-    const r = this.schedule, s = this.bufferingItem;
-    if (this.bufferedPos > e || !r)
+    const i = this.schedule, s = this.bufferingItem;
+    if (this.bufferedPos > e || !i)
       return;
     if (t.length === 1 && this.itemsMatch(t[0], s)) {
       this.bufferedPos = e;
       return;
     }
     const a = this.playingItem, o = this.findItemIndex(a);
-    let l = r.findItemIndexAtTime(e);
+    let l = i.findItemIndexAtTime(e);
     if (this.bufferedPos < e) {
       var u;
       const c = this.findItemIndex(s), h = Math.min(c + 1, t.length - 1), d = t[h];
@@ -36930,8 +36930,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     } else n && a && !this.itemsMatch(a, s) && (l === o ? this.bufferedToItem(a) : l === o + 1 && this.bufferedToItem(t[l]));
   }
   assetsBuffered(e, t) {
-    return e.event.assetList.length === 0 ? !1 : !e.event.assetList.some((r) => {
-      const s = this.getAssetPlayer(r.identifier);
+    return e.event.assetList.length === 0 ? !1 : !e.event.assetList.some((i) => {
+      const s = this.getAssetPlayer(i.identifier);
       return !(s != null && s.bufferedInPlaceToEnd(t));
     });
   }
@@ -36939,15 +36939,15 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const t = this.bufferingItem, n = this.schedule;
     if (!this.itemsMatch(e, t) && n) {
       const {
-        items: r,
+        items: i,
         events: s
       } = n;
-      if (!r || !s)
+      if (!i || !s)
         return t;
       const a = this.isInterstitial(e), o = this.getBufferingPlayer();
       this.bufferingItem = e, this.bufferedPos = Math.max(e.start, Math.min(e.end, this.timelinePos));
       const l = o ? o.remaining : t ? t.end - this.timelinePos : 0;
-      if (this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${oi(e)}` + (t ? ` (${l.toFixed(2)} remaining)` : "")), !this.playbackDisabled)
+      if (this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${or(e)}` + (t ? ` (${l.toFixed(2)} remaining)` : "")), !this.playbackDisabled)
         if (a) {
           const u = n.findAssetIndex(e.event, this.bufferedPos);
           e.event.assetList.forEach((c, h) => {
@@ -36958,7 +36958,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
           this.hls.resumeBuffering(), this.playerQueue.forEach((u) => u.pauseBuffering());
       this.hls.trigger(S.INTERSTITIALS_BUFFERED_TO_BOUNDARY, {
         events: s.slice(0),
-        schedule: r.slice(0),
+        schedule: i.slice(0),
         bufferingIndex: this.findItemIndex(e),
         playingIndex: this.findItemIndex(this.playingItem)
       });
@@ -36972,8 +36972,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         this.bufferedToEvent(e, t);
       else if (n !== null) {
         this.bufferingAsset = null;
-        const r = this.detachedData;
-        r ? r.mediaSource ? this.attachPrimary(e.start, e, !0) : this.preloadPrimary(e) : this.preloadPrimary(e);
+        const i = this.detachedData;
+        i ? i.mediaSource ? this.attachPrimary(e.start, e, !0) : this.preloadPrimary(e) : this.preloadPrimary(e);
       }
     }
   }
@@ -36982,8 +36982,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     this.startLoadingPrimaryAt(n);
   }
   bufferedToEvent(e, t) {
-    const n = e.event, r = n.assetList.length === 0 && !n.assetListLoader, s = n.cue.once;
-    if (r || !s) {
+    const n = e.event, i = n.assetList.length === 0 && !n.assetListLoader, s = n.cue.once;
+    if (i || !s) {
       const a = this.preloadAssets(n, t);
       if (a != null && a.interstitial.appendInPlace) {
         const o = this.primaryMedia;
@@ -36992,7 +36992,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     }
   }
   preloadAssets(e, t) {
-    const n = e.assetUrl, r = e.assetList.length, s = r === 0 && !e.assetListLoader, a = e.cue.once;
+    const n = e.assetUrl, i = e.assetList.length, s = i === 0 && !e.assetListLoader, a = e.cue.once;
     if (s) {
       const l = e.timelineStart;
       if (e.appendInPlace) {
@@ -37005,12 +37005,12 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
         const d = c - l;
         d > 0 && (u = Math.round(d * 1e3) / 1e3);
       }
-      if (this.log(`Load interstitial asset ${t + 1}/${n ? 1 : r} ${e}${u ? ` live-start: ${c} start-offset: ${u}` : ""}`), n)
+      if (this.log(`Load interstitial asset ${t + 1}/${n ? 1 : i} ${e}${u ? ` live-start: ${c} start-offset: ${u}` : ""}`), n)
         return this.createAsset(e, 0, 0, l, e.duration, n);
       const h = this.assetListLoader.loadAssetList(e, u);
       h && (e.assetListLoader = h);
-    } else if (!a && r) {
-      for (let u = t; u < r; u++) {
+    } else if (!a && i) {
+      for (let u = t; u < i; u++) {
         const c = e.assetList[u], h = this.getAssetPlayerQueueIndex(c.identifier);
         (h === -1 || this.playerQueue[h].destroyed) && !c.error && this.createAssetPlayer(e, c, u);
       }
@@ -37026,11 +37026,11 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const t = this.requiredTracks;
     if (!t)
       return;
-    this.log(`Removing front buffer starting at ${e}`), Object.keys(t).forEach((r) => {
+    this.log(`Removing front buffer starting at ${e}`), Object.keys(t).forEach((i) => {
       this.hls.trigger(S.BUFFER_FLUSHING, {
         startOffset: e,
         endOffset: 1 / 0,
-        type: r
+        type: i
       });
     });
   }
@@ -37058,23 +37058,23 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     }
     return null;
   }
-  createAsset(e, t, n, r, s, a) {
+  createAsset(e, t, n, i, s, a) {
     const o = {
       parentIdentifier: e.identifier,
-      identifier: p9(e, a, t),
+      identifier: pw(e, a, t),
       duration: s,
       startOffset: n,
-      timelineStart: r,
+      timelineStart: i,
       uri: a
     };
     return this.createAssetPlayer(e, o, t);
   }
   createAssetPlayer(e, t, n) {
-    const r = this.hls, s = r.userConfig;
+    const i = this.hls, s = i.userConfig;
     let a = s.videoPreference;
-    const o = r.loadLevelObj || r.levels[r.currentLevel];
+    const o = i.loadLevelObj || i.levels[i.currentLevel];
     (a || o) && (a = Qe({}, a), o.videoCodec && (a.videoCodec = o.videoCodec), o.videoRange && (a.allowedVideoRanges = [o.videoRange]));
-    const l = r.audioTracks[r.audioTrack], u = r.subtitleTracks[r.subtitleTrack];
+    const l = i.audioTracks[i.audioTrack], u = i.subtitleTracks[i.subtitleTrack];
     let c = 0;
     if (this.primaryLive || e.appendInPlace) {
       const T = this.timelinePos - t.timelineStart;
@@ -37084,12 +37084,12 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       }
     }
     const h = t.identifier, d = je(je({}, s), {}, {
-      maxMaxBufferLength: Math.min(180, r.config.maxMaxBufferLength),
+      maxMaxBufferLength: Math.min(180, i.config.maxMaxBufferLength),
       autoStartLoad: !0,
       startFragPrefetch: !0,
-      primarySessionId: r.sessionId,
+      primarySessionId: i.sessionId,
       assetPlayerId: h,
-      abrEwmaDefaultEstimate: r.bandwidthEstimate,
+      abrEwmaDefaultEstimate: i.bandwidthEstimate,
       interstitialsController: void 0,
       startPosition: c,
       liveDurationInfinity: !1,
@@ -37103,7 +37103,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     f != null && f.sessionId && f.contentId && (d.cmcd = Qe({}, f, {
       contentId: Ca(t.uri)
     })), this.getAssetPlayer(h) && this.warn(`Duplicate date range identifier ${e} and asset ${h}`);
-    const m = new y9(this.HlsPlayerClass, d, e, t);
+    const m = new yw(this.HlsPlayerClass, d, e, t);
     this.playerQueue.push(m), e.assetList[n] = t;
     let g = !0;
     const p = (T) => {
@@ -37200,8 +37200,8 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   clearAssetPlayer(e, t) {
     const n = this.getAssetPlayerQueueIndex(e);
     if (n !== -1) {
-      const r = this.playerQueue[n];
-      this.log(`clear ${r} toSegment: ${t && oi(t)}`), this.transferMediaFromPlayer(r, t), this.playerQueue.splice(n, 1), r.destroy();
+      const i = this.playerQueue[n];
+      this.log(`clear ${i} toSegment: ${t && or(t)}`), this.transferMediaFromPlayer(i, t), this.playerQueue.splice(n, 1), i.destroy();
     }
   }
   emptyPlayerQueue() {
@@ -37210,23 +37210,23 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
       e.destroy();
     this.playerQueue = [];
   }
-  startAssetPlayer(e, t, n, r, s) {
+  startAssetPlayer(e, t, n, i, s) {
     const {
       interstitial: a,
       assetItem: o,
       assetId: l
     } = e, u = a.assetList.length, c = this.playingAsset;
-    this.endedAsset = null, this.playingAsset = o, (!c || c.identifier !== l) && (c && (this.clearAssetPlayer(c.identifier, n[r]), delete c.error), this.log(`INTERSTITIAL_ASSET_STARTED ${t + 1}/${u} ${Cs(o)}`), this.hls.trigger(S.INTERSTITIAL_ASSET_STARTED, {
+    this.endedAsset = null, this.playingAsset = o, (!c || c.identifier !== l) && (c && (this.clearAssetPlayer(c.identifier, n[i]), delete c.error), this.log(`INTERSTITIAL_ASSET_STARTED ${t + 1}/${u} ${Cs(o)}`), this.hls.trigger(S.INTERSTITIAL_ASSET_STARTED, {
       asset: o,
       assetListIndex: t,
       event: a,
       schedule: n.slice(0),
-      scheduleIndex: r,
+      scheduleIndex: i,
       player: e
     })), this.bufferAssetPlayer(e, s);
   }
   bufferAssetPlayer(e, t) {
-    var n, r;
+    var n, i;
     if (!this.schedule)
       return;
     const {
@@ -37242,7 +37242,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const c = s.appendInPlace;
     if (c && (u == null ? void 0 : u.interstitial.appendInPlace) === !1)
       return;
-    const h = (u == null ? void 0 : u.tracks) || ((r = this.detachedData) == null ? void 0 : r.tracks) || this.requiredTracks;
+    const h = (u == null ? void 0 : u.tracks) || ((i = this.detachedData) == null ? void 0 : i.tracks) || this.requiredTracks;
     if (c && a !== this.playingAsset) {
       if (!e.tracks) {
         this.log(`Waiting for track info before buffering ${e}`);
@@ -37265,12 +37265,12 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const t = this.schedule, n = this.primaryMedia;
     if (!t || !n)
       return;
-    const r = n.currentTime, s = t.findAssetIndex(e, r), a = e.assetList[s];
+    const i = n.currentTime, s = t.findAssetIndex(e, i), a = e.assetList[s];
     if (a) {
       const o = this.getAssetPlayer(a.identifier);
       if (o) {
-        const l = o.currentTime || r - a.timelineStart, u = o.duration - l;
-        if (this.warn(`Stalled at ${l} of ${l + u} in ${o} ${e} (media.currentTime: ${r})`), l && (u / n.playbackRate < 0.5 || o.bufferedInPlaceToEnd(n)) && o.hls) {
+        const l = o.currentTime || i - a.timelineStart, u = o.duration - l;
+        if (this.warn(`Stalled at ${l} of ${l + u} in ${o} ${e} (media.currentTime: ${i})`), l && (u / n.playbackRate < 0.5 || o.bufferedInPlaceToEnd(n)) && o.hls) {
           const c = t.findEventIndex(e.identifier);
           this.advanceAfterAssetEnded(e, c, s);
         }
@@ -37281,17 +37281,17 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     const t = this.primaryMedia;
     t && t.currentTime < e && (t.currentTime = e);
   }
-  handleAssetItemError(e, t, n, r, s) {
+  handleAssetItemError(e, t, n, i, s) {
     if (e.details === G.BUFFER_STALLED_ERROR)
       return;
-    const a = t.assetList[r] || null;
+    const a = t.assetList[i] || null;
     if (this.warn(`INTERSTITIAL_ASSET_ERROR ${a && Cs(a)} ${e.error}`), !this.schedule)
       return;
     const o = (a == null ? void 0 : a.identifier) || "", l = this.getAssetPlayerQueueIndex(o), u = this.playerQueue[l] || null, c = this.schedule.items, h = Qe({}, e, {
       fatal: !1,
       errorAction: $s(!0),
       asset: a,
-      assetListIndex: r,
+      assetListIndex: i,
       event: t,
       schedule: c,
       scheduleIndex: n,
@@ -37303,29 +37303,29 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     if (a && (this.clearAssetPlayer(o, null), a.error = m), !t.assetList.some((g) => !g.error))
       t.error = m;
     else
-      for (let g = r; g < t.assetList.length; g++)
+      for (let g = i; g < t.assetList.length; g++)
         this.resetAssetPlayer(t.assetList[g].identifier);
-    this.updateSchedule(!0), t.error ? this.primaryFallback(t) : d && d.identifier === o ? this.advanceAfterAssetEnded(t, n, r) : f && f.identifier === o && this.isInterstitial(this.bufferingItem) && this.advanceAssetBuffering(this.bufferingItem, f);
+    this.updateSchedule(!0), t.error ? this.primaryFallback(t) : d && d.identifier === o ? this.advanceAfterAssetEnded(t, n, i) : f && f.identifier === o && this.isInterstitial(this.bufferingItem) && this.advanceAssetBuffering(this.bufferingItem, f);
   }
   primaryFallback(e) {
     const t = e.timelineStart, n = this.effectivePlayingItem;
-    let r = this.timelinePos;
+    let i = this.timelinePos;
     if (n) {
-      this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${oi(n)} error: ${e.error}`), r === -1 && (r = this.hls.startPosition);
-      const a = this.updateItem(n, r);
+      this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${i} playing: ${or(n)} error: ${e.error}`), i === -1 && (i = this.hls.startPosition);
+      const a = this.updateItem(n, i);
       this.itemsMatch(n, a) && this.clearInterstitial(e, null), e.appendInPlace && (this.attachPrimary(t, null), this.flushFrontBuffer(t));
-    } else if (r === -1) {
+    } else if (i === -1) {
       this.checkStart();
       return;
     }
     if (!this.schedule)
       return;
-    const s = this.schedule.findItemIndexAtTime(r);
+    const s = this.schedule.findItemIndexAtTime(i);
     this.setSchedulePosition(s);
   }
   // Asset List loading
   onAssetListLoaded(e, t) {
-    var n, r;
+    var n, i;
     const s = t.event, a = s.identifier, o = t.assetListResponse.ASSETS;
     if (!((n = this.schedule) != null && n.hasEvent(a)))
       return;
@@ -37337,7 +37337,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
     }), s.duration = c, this.log(`Loaded asset-list with duration: ${c} (was: ${u}) ${s}`);
     const h = this.waitingItem, d = (h == null ? void 0 : h.event.identifier) === a;
     this.updateSchedule();
-    const f = (r = this.bufferingItem) == null ? void 0 : r.event;
+    const f = (i = this.bufferingItem) == null ? void 0 : i.event;
     if (d) {
       var m;
       const g = this.schedule.findEventIndex(a), p = (m = this.schedule.items) == null ? void 0 : m[g];
@@ -37383,7 +37383,7 @@ Schedule: ${l.map((g) => oi(g))} pos: ${this.timelinePos}`), c.length && this.lo
   }
 }
 const N1 = 500;
-class T9 extends ed {
+class Tw extends ed {
   constructor(e, t, n) {
     super(e, t, n, "subtitle-stream-controller", ce.SUBTITLE), this.currentTrackId = -1, this.tracksBuffered = [], this.mainDetails = null, this.registerListeners();
   }
@@ -37419,9 +37419,9 @@ class T9 extends ed {
   onSubtitleFragProcessed(e, t) {
     const {
       frag: n,
-      success: r
+      success: i
     } = t;
-    if (this.fragContextChanged(n) || (Tt(n) && (this.fragPrevious = n), this.state = Q.IDLE), !r)
+    if (this.fragContextChanged(n) || (Tt(n) && (this.fragPrevious = n), this.state = Q.IDLE), !i)
       return;
     const s = this.tracksBuffered[this.currentTrackId];
     if (!s)
@@ -37442,10 +37442,10 @@ class T9 extends ed {
   onBufferFlushing(e, t) {
     const {
       startOffset: n,
-      endOffset: r
+      endOffset: i
     } = t;
-    if (n === 0 && r !== Number.POSITIVE_INFINITY) {
-      const s = r - 1;
+    if (n === 0 && i !== Number.POSITIVE_INFINITY) {
+      const s = i - 1;
       if (s <= 0)
         return;
       t.endOffsetSubtitles = Math.max(0, s), this.tracksBuffered.forEach((a) => {
@@ -37476,8 +37476,8 @@ class T9 extends ed {
       return;
     }
     this.tracksBuffered = [], this.levels = t.map((n) => {
-      const r = new Ka(n);
-      return this.tracksBuffered[r.id] = [], r;
+      const i = new Ka(n);
+      return this.tracksBuffered[i.id] = [], i;
     }), this.fragmentTracker.removeFragmentsInRange(0, Number.POSITIVE_INFINITY, ce.SUBTITLE), this.fragPrevious = null, this.mediaBuffer = null;
   }
   onSubtitleTrackSwitch(e, t) {
@@ -37486,14 +37486,14 @@ class T9 extends ed {
       this.clearInterval();
       return;
     }
-    const r = this.levels[this.currentTrackId];
-    r != null && r.details ? this.mediaBuffer = this.mediaBufferTimeRanges : this.mediaBuffer = null, r && this.state !== Q.STOPPED && this.setInterval(N1);
+    const i = this.levels[this.currentTrackId];
+    i != null && i.details ? this.mediaBuffer = this.mediaBufferTimeRanges : this.mediaBuffer = null, i && this.state !== Q.STOPPED && this.setInterval(N1);
   }
   // Got a new set of subtitle fragments.
   onSubtitleTrackLoaded(e, t) {
     var n;
     const {
-      currentTrackId: r,
+      currentTrackId: i,
       levels: s
     } = this, {
       details: a,
@@ -37525,7 +37525,7 @@ class T9 extends ed {
       }
       h && !this.startFragRequested && this.setStartPosition(h, u);
     }
-    l.details = a, this.levelLastLoaded = l, o === r && (this.hls.trigger(S.SUBTITLE_TRACK_UPDATED, {
+    l.details = a, this.levelLastLoaded = l, o === i && (this.hls.trigger(S.SUBTITLE_TRACK_UPDATED, {
       details: a,
       id: o,
       groupId: t.groupId
@@ -37535,10 +37535,10 @@ class T9 extends ed {
     const {
       frag: t,
       payload: n
-    } = e, r = t.decryptdata, s = this.hls;
-    if (!this.fragContextChanged(t) && n && n.byteLength > 0 && r != null && r.key && r.iv && Us(r.method)) {
+    } = e, i = t.decryptdata, s = this.hls;
+    if (!this.fragContextChanged(t) && n && n.byteLength > 0 && i != null && i.key && i.iv && Us(i.method)) {
       const a = performance.now();
-      this.decrypter.decrypt(new Uint8Array(n), r.key.buffer, r.iv.buffer, Zh(r.method)).catch((o) => {
+      this.decrypter.decrypt(new Uint8Array(n), i.key.buffer, i.iv.buffer, Zh(i.method)).catch((o) => {
         throw s.trigger(S.ERROR, {
           type: fe.MEDIA_ERROR,
           details: G.FRAG_DECRYPT_ERROR,
@@ -37575,8 +37575,8 @@ class T9 extends ed {
       if (!n || !t.length || !n.details || this.waitForLive(n))
         return;
       const {
-        config: r
-      } = this, s = this.getLoadPosition(), a = De.bufferedInfo(this.tracksBuffered[this.currentTrackId] || [], s, r.maxBufferHole), {
+        config: i
+      } = this, s = this.getLoadPosition(), a = De.bufferedInfo(this.tracksBuffered[this.currentTrackId] || [], s, i.maxBufferHole), {
         end: o,
         len: l
       } = a, u = n.details, c = this.hls.maxBufferLength + u.levelTargetDuration;
@@ -37586,7 +37586,7 @@ class T9 extends ed {
       let m = null;
       const g = this.fragPrevious;
       if (o < f) {
-        const y = r.maxFragLookUpTolerance, v = o > f - y ? 0 : y;
+        const y = i.maxFragLookUpTolerance, v = o > f - y ? 0 : y;
         m = os(g, h, Math.max(h[0].start, o), v), !m && g && g.start < h[0].start && (m = h[0]);
       } else
         m = h[d - 1];
@@ -37603,16 +37603,16 @@ class T9 extends ed {
     Tt(e) ? super.loadFragment(e, t, n) : this._loadInitSegment(e, t);
   }
   get mediaBufferTimeRanges() {
-    return new A9(this.tracksBuffered[this.currentTrackId] || []);
+    return new Aw(this.tracksBuffered[this.currentTrackId] || []);
   }
 }
-class A9 {
+class Aw {
   constructor(e) {
     this.buffered = void 0;
-    const t = (n, r, s) => {
-      if (r = r >>> 0, r > s - 1)
-        throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${s})`);
-      return e[r][n];
+    const t = (n, i, s) => {
+      if (i = i >>> 0, i > s - 1)
+        throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);
+      return e[i][n];
     };
     this.buffered = {
       get length() {
@@ -37627,7 +37627,7 @@ class A9 {
     };
   }
 }
-const x9 = {
+const xw = {
   42: 225,
   // lowercase a, acute accent
   92: 233,
@@ -37815,7 +37815,7 @@ const x9 = {
   // Box drawings heavy up and right
   207: 9499
   // Box drawings heavy up and left
-}, V2 = (i) => String.fromCharCode(x9[i] || i), hi = 15, Qi = 100, w9 = {
+}, V2 = (r) => String.fromCharCode(xw[r] || r), hr = 15, Qr = 100, ww = {
   17: 1,
   18: 3,
   21: 5,
@@ -37824,7 +37824,7 @@ const x9 = {
   16: 11,
   19: 12,
   20: 14
-}, D9 = {
+}, Dw = {
   17: 2,
   18: 4,
   21: 6,
@@ -37832,7 +37832,7 @@ const x9 = {
   23: 10,
   19: 13,
   20: 15
-}, k9 = {
+}, kw = {
   25: 1,
   26: 3,
   29: 5,
@@ -37841,7 +37841,7 @@ const x9 = {
   24: 11,
   27: 12,
   28: 14
-}, I9 = {
+}, Iw = {
   25: 2,
   26: 4,
   29: 6,
@@ -37849,8 +37849,8 @@ const x9 = {
   31: 10,
   27: 13,
   28: 15
-}, L9 = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "black", "transparent"];
-class R9 {
+}, Lw = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "black", "transparent"];
+class Rw {
   constructor() {
     this.time = null, this.verboseLevel = 0;
   }
@@ -37861,7 +37861,7 @@ class R9 {
     }
   }
 }
-const Gr = function(e) {
+const Gi = function(e) {
   const t = [];
   for (let n = 0; n < e.length; n++)
     t.push(e[n].toString(16));
@@ -37877,8 +37877,8 @@ class K2 {
   setStyles(e) {
     const t = ["foreground", "underline", "italics", "background", "flash"];
     for (let n = 0; n < t.length; n++) {
-      const r = t[n];
-      e.hasOwnProperty(r) && (this[r] = e[r]);
+      const i = t[n];
+      e.hasOwnProperty(i) && (this[i] = e[i]);
     }
   }
   isDefault() {
@@ -37894,7 +37894,7 @@ class K2 {
     return "color=" + this.foreground + ", underline=" + this.underline + ", italics=" + this.italics + ", background=" + this.background + ", flash=" + this.flash;
   }
 }
-class C9 {
+class Cw {
   constructor() {
     this.uchar = " ", this.penState = new K2();
   }
@@ -37917,26 +37917,26 @@ class C9 {
     return this.uchar === " " && this.penState.isDefault();
   }
 }
-class F9 {
+class Fw {
   constructor(e) {
     this.chars = [], this.pos = 0, this.currPenState = new K2(), this.cueStartTime = null, this.logger = void 0;
-    for (let t = 0; t < Qi; t++)
-      this.chars.push(new C9());
+    for (let t = 0; t < Qr; t++)
+      this.chars.push(new Cw());
     this.logger = e;
   }
   equals(e) {
-    for (let t = 0; t < Qi; t++)
+    for (let t = 0; t < Qr; t++)
       if (!this.chars[t].equals(e.chars[t]))
         return !1;
     return !0;
   }
   copy(e) {
-    for (let t = 0; t < Qi; t++)
+    for (let t = 0; t < Qr; t++)
       this.chars[t].copy(e.chars[t]);
   }
   isEmpty() {
     let e = !0;
-    for (let t = 0; t < Qi; t++)
+    for (let t = 0; t < Qr; t++)
       if (!this.chars[t].isEmpty()) {
         e = !1;
         break;
@@ -37947,7 +37947,7 @@ class F9 {
    *  Set the cursor to a valid column.
    */
   setCursor(e) {
-    this.pos !== e && (this.pos = e), this.pos < 0 ? (this.logger.log(3, "Negative cursor position " + this.pos), this.pos = 0) : this.pos > Qi && (this.logger.log(3, "Too large cursor position " + this.pos), this.pos = Qi);
+    this.pos !== e && (this.pos = e), this.pos < 0 ? (this.logger.log(3, "Negative cursor position " + this.pos), this.pos = 0) : this.pos > Qr && (this.logger.log(3, "Too large cursor position " + this.pos), this.pos = Qr);
   }
   /**
    * Move the cursor relative to current position.
@@ -37968,7 +37968,7 @@ class F9 {
   insertChar(e) {
     e >= 144 && this.backSpace();
     const t = V2(e);
-    if (this.pos >= Qi) {
+    if (this.pos >= Qr) {
       this.logger.log(0, () => "Cannot insert " + e.toString(16) + " (" + t + ") at position " + this.pos + ". Skipping it!");
       return;
     }
@@ -37976,7 +37976,7 @@ class F9 {
   }
   clearFromPos(e) {
     let t;
-    for (t = e; t < Qi; t++)
+    for (t = e; t < Qr; t++)
       this.chars[t].reset();
   }
   clear() {
@@ -37988,9 +37988,9 @@ class F9 {
   getTextString() {
     const e = [];
     let t = !0;
-    for (let n = 0; n < Qi; n++) {
-      const r = this.chars[n].uchar;
-      r !== " " && (t = !1), e.push(r);
+    for (let n = 0; n < Qr; n++) {
+      const i = this.chars[n].uchar;
+      i !== " " && (t = !1), e.push(i);
     }
     return t ? "" : e.join("");
   }
@@ -38000,19 +38000,19 @@ class F9 {
 }
 class zu {
   constructor(e) {
-    this.rows = [], this.currRow = hi - 1, this.nrRollUpRows = null, this.lastOutputScreen = null, this.logger = void 0;
-    for (let t = 0; t < hi; t++)
-      this.rows.push(new F9(e));
+    this.rows = [], this.currRow = hr - 1, this.nrRollUpRows = null, this.lastOutputScreen = null, this.logger = void 0;
+    for (let t = 0; t < hr; t++)
+      this.rows.push(new Fw(e));
     this.logger = e;
   }
   reset() {
-    for (let e = 0; e < hi; e++)
+    for (let e = 0; e < hr; e++)
       this.rows[e].clear();
-    this.currRow = hi - 1;
+    this.currRow = hr - 1;
   }
   equals(e) {
     let t = !0;
-    for (let n = 0; n < hi; n++)
+    for (let n = 0; n < hr; n++)
       if (!this.rows[n].equals(e.rows[n])) {
         t = !1;
         break;
@@ -38020,12 +38020,12 @@ class zu {
     return t;
   }
   copy(e) {
-    for (let t = 0; t < hi; t++)
+    for (let t = 0; t < hr; t++)
       this.rows[t].copy(e.rows[t]);
   }
   isEmpty() {
     let e = !0;
-    for (let t = 0; t < hi; t++)
+    for (let t = 0; t < hr; t++)
       if (!this.rows[t].isEmpty()) {
         e = !1;
         break;
@@ -38057,7 +38057,7 @@ class zu {
     this.logger.log(2, () => "pacData = " + et(e));
     let t = e.row - 1;
     if (this.nrRollUpRows && t < this.nrRollUpRows - 1 && (t = this.nrRollUpRows - 1), this.nrRollUpRows && this.currRow !== t) {
-      for (let o = 0; o < hi; o++)
+      for (let o = 0; o < hr; o++)
         this.rows[o].clear();
       const s = this.currRow + 1 - this.nrRollUpRows, a = this.lastOutputScreen;
       if (a) {
@@ -38073,14 +38073,14 @@ class zu {
       const s = e.indent, a = Math.max(s - 1, 0);
       n.setCursor(e.indent), e.color = n.chars[a].penState.foreground;
     }
-    const r = {
+    const i = {
       foreground: e.color,
       underline: e.underline,
       italics: e.italics,
       background: "black",
       flash: !1
     };
-    this.setPen(r);
+    this.setPen(i);
   }
   /**
    * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).
@@ -38106,10 +38106,10 @@ class zu {
   getDisplayText(e) {
     e = e || !1;
     const t = [];
-    let n = "", r = -1;
-    for (let s = 0; s < hi; s++) {
+    let n = "", i = -1;
+    for (let s = 0; s < hr; s++) {
       const a = this.rows[s].getTextString();
-      a && (r = s + 1, e ? t.push("Row " + r + ": '" + a + "'") : t.push(a.trim()));
+      a && (i = s + 1, e ? t.push("Row " + i + ": '" + a + "'") : t.push(a.trim()));
     }
     return t.length > 0 && (e ? n = "[" + t.join(" | ") + "]" : n = t.join(`
 `)), n;
@@ -38120,10 +38120,10 @@ class zu {
 }
 class $1 {
   constructor(e, t, n) {
-    this.chNr = void 0, this.outputFilter = void 0, this.mode = void 0, this.verbose = void 0, this.displayedMemory = void 0, this.nonDisplayedMemory = void 0, this.lastOutputScreen = void 0, this.currRollUpRow = void 0, this.writeScreen = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chNr = e, this.outputFilter = t, this.mode = null, this.verbose = 0, this.displayedMemory = new zu(n), this.nonDisplayedMemory = new zu(n), this.lastOutputScreen = new zu(n), this.currRollUpRow = this.displayedMemory.rows[hi - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null, this.logger = n;
+    this.chNr = void 0, this.outputFilter = void 0, this.mode = void 0, this.verbose = void 0, this.displayedMemory = void 0, this.nonDisplayedMemory = void 0, this.lastOutputScreen = void 0, this.currRollUpRow = void 0, this.writeScreen = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chNr = e, this.outputFilter = t, this.mode = null, this.verbose = 0, this.displayedMemory = new zu(n), this.nonDisplayedMemory = new zu(n), this.lastOutputScreen = new zu(n), this.currRollUpRow = this.displayedMemory.rows[hr - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null, this.logger = n;
   }
   reset() {
-    this.mode = null, this.displayedMemory.reset(), this.nonDisplayedMemory.reset(), this.lastOutputScreen.reset(), this.outputFilter.reset(), this.currRollUpRow = this.displayedMemory.rows[hi - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null;
+    this.mode = null, this.displayedMemory.reset(), this.nonDisplayedMemory.reset(), this.lastOutputScreen.reset(), this.outputFilter.reset(), this.currRollUpRow = this.displayedMemory.rows[hr - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null;
   }
   getHandler() {
     return this.outputFilter;
@@ -38202,8 +38202,8 @@ class $1 {
     if (t.underline = e % 2 === 1, t.italics = e >= 46, t.italics)
       t.foreground = "white";
     else {
-      const n = Math.floor(e / 2) - 16, r = ["white", "green", "blue", "cyan", "red", "yellow", "magenta"];
-      t.foreground = r[n];
+      const n = Math.floor(e / 2) - 16, i = ["white", "green", "blue", "cyan", "red", "yellow", "magenta"];
+      t.foreground = i[n];
     }
     this.logger.log(2, "MIDROW: " + et(t)), this.writeScreen.setPen(t);
   }
@@ -38217,9 +38217,9 @@ class $1 {
 }
 class U1 {
   constructor(e, t, n) {
-    this.channels = void 0, this.currentChannel = 0, this.cmdHistory = M9(), this.logger = void 0;
-    const r = this.logger = new R9();
-    this.channels = [null, new $1(e, t, r), new $1(e + 1, n, r)];
+    this.channels = void 0, this.currentChannel = 0, this.cmdHistory = Mw(), this.logger = void 0;
+    const i = this.logger = new Rw();
+    this.channels = [null, new $1(e, t, i), new $1(e + 1, n, i)];
   }
   getHandler(e) {
     return this.channels[e].getHandler();
@@ -38233,25 +38233,25 @@ class U1 {
   addData(e, t) {
     this.logger.time = e;
     for (let n = 0; n < t.length; n += 2) {
-      const r = t[n] & 127, s = t[n + 1] & 127;
+      const i = t[n] & 127, s = t[n + 1] & 127;
       let a = !1, o = null;
-      if (r === 0 && s === 0)
+      if (i === 0 && s === 0)
         continue;
-      this.logger.log(3, () => "[" + Gr([t[n], t[n + 1]]) + "] -> (" + Gr([r, s]) + ")");
+      this.logger.log(3, () => "[" + Gi([t[n], t[n + 1]]) + "] -> (" + Gi([i, s]) + ")");
       const l = this.cmdHistory;
-      if (r >= 16 && r <= 31) {
-        if (P9(r, s, l)) {
-          Ko(null, null, l), this.logger.log(3, () => "Repeated command (" + Gr([r, s]) + ") is dropped");
+      if (i >= 16 && i <= 31) {
+        if (Pw(i, s, l)) {
+          Ko(null, null, l), this.logger.log(3, () => "Repeated command (" + Gi([i, s]) + ") is dropped");
           continue;
         }
-        Ko(r, s, this.cmdHistory), a = this.parseCmd(r, s), a || (a = this.parseMidrow(r, s)), a || (a = this.parsePAC(r, s)), a || (a = this.parseBackgroundAttributes(r, s));
+        Ko(i, s, this.cmdHistory), a = this.parseCmd(i, s), a || (a = this.parseMidrow(i, s)), a || (a = this.parsePAC(i, s)), a || (a = this.parseBackgroundAttributes(i, s));
       } else
         Ko(null, null, l);
-      if (!a && (o = this.parseChars(r, s), o)) {
+      if (!a && (o = this.parseChars(i, s), o)) {
         const c = this.currentChannel;
         c && c > 0 ? this.channels[c].insertChars(o) : this.logger.log(2, "No channel found yet. TEXT-MODE?");
       }
-      !a && !o && this.logger.log(2, () => "Couldn't parse cleaned data " + Gr([r, s]) + " orig: " + Gr([t[n], t[n + 1]]));
+      !a && !o && this.logger.log(2, () => "Couldn't parse cleaned data " + Gi([i, s]) + " orig: " + Gi([t[n], t[n + 1]]));
     }
   }
   /**
@@ -38259,8 +38259,8 @@ class U1 {
    * @returns True if a command was found
    */
   parseCmd(e, t) {
-    const n = (e === 20 || e === 28 || e === 21 || e === 29) && t >= 32 && t <= 47, r = (e === 23 || e === 31) && t >= 33 && t <= 35;
-    if (!(n || r))
+    const n = (e === 20 || e === 28 || e === 21 || e === 29) && t >= 32 && t <= 47, i = (e === 23 || e === 31) && t >= 33 && t <= 35;
+    if (!(n || i))
       return !1;
     const s = e === 20 || e === 21 || e === 23 ? 1 : 2, a = this.channels[s];
     return e === 20 || e === 21 || e === 28 || e === 29 ? t === 32 ? a.ccRCL() : t === 33 ? a.ccBS() : t === 34 ? a.ccAOF() : t === 35 ? a.ccAON() : t === 36 ? a.ccDER() : t === 37 ? a.ccRU(2) : t === 38 ? a.ccRU(3) : t === 39 ? a.ccRU(4) : t === 40 ? a.ccFON() : t === 41 ? a.ccRDC() : t === 42 ? a.ccTR() : t === 43 ? a.ccRTD() : t === 44 ? a.ccEDM() : t === 45 ? a.ccCR() : t === 46 ? a.ccENM() : t === 47 && a.ccEOC() : a.ccTO(t - 32), this.currentChannel = s, !0;
@@ -38273,8 +38273,8 @@ class U1 {
     if ((e === 17 || e === 25) && t >= 32 && t <= 47) {
       if (e === 17 ? n = 1 : n = 2, n !== this.currentChannel)
         return this.logger.log(0, "Mismatch channel in midrow parsing"), !1;
-      const r = this.channels[n];
-      return r ? (r.ccMIDROW(t), this.logger.log(3, () => "MIDROW (" + Gr([e, t]) + ")"), !0) : !1;
+      const i = this.channels[n];
+      return i ? (i.ccMIDROW(t), this.logger.log(3, () => "MIDROW (" + Gi([e, t]) + ")"), !0) : !1;
     }
     return !1;
   }
@@ -38284,11 +38284,11 @@ class U1 {
    */
   parsePAC(e, t) {
     let n;
-    const r = (e >= 17 && e <= 23 || e >= 25 && e <= 31) && t >= 64 && t <= 127, s = (e === 16 || e === 24) && t >= 64 && t <= 95;
-    if (!(r || s))
+    const i = (e >= 17 && e <= 23 || e >= 25 && e <= 31) && t >= 64 && t <= 127, s = (e === 16 || e === 24) && t >= 64 && t <= 95;
+    if (!(i || s))
       return !1;
     const a = e <= 23 ? 1 : 2;
-    t >= 64 && t <= 95 ? n = a === 1 ? w9[e] : k9[e] : n = a === 1 ? D9[e] : I9[e];
+    t >= 64 && t <= 95 ? n = a === 1 ? ww[e] : kw[e] : n = a === 1 ? Dw[e] : Iw[e];
     const o = this.channels[a];
     return o ? (o.setPAC(this.interpretPAC(n, t)), this.currentChannel = a, !0) : !1;
   }
@@ -38298,38 +38298,38 @@ class U1 {
    */
   interpretPAC(e, t) {
     let n;
-    const r = {
+    const i = {
       color: null,
       italics: !1,
       indent: null,
       underline: !1,
       row: e
     };
-    return t > 95 ? n = t - 96 : n = t - 64, r.underline = (n & 1) === 1, n <= 13 ? r.color = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "white"][Math.floor(n / 2)] : n <= 15 ? (r.italics = !0, r.color = "white") : r.indent = Math.floor((n - 16) / 2) * 4, r;
+    return t > 95 ? n = t - 96 : n = t - 64, i.underline = (n & 1) === 1, n <= 13 ? i.color = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "white"][Math.floor(n / 2)] : n <= 15 ? (i.italics = !0, i.color = "white") : i.indent = Math.floor((n - 16) / 2) * 4, i;
   }
   /**
    * Parse characters.
    * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.
    */
   parseChars(e, t) {
-    let n, r = null, s = null;
+    let n, i = null, s = null;
     if (e >= 25 ? (n = 2, s = e - 8) : (n = 1, s = e), s >= 17 && s <= 19) {
       let a;
-      s === 17 ? a = t + 80 : s === 18 ? a = t + 112 : a = t + 144, this.logger.log(2, () => "Special char '" + V2(a) + "' in channel " + n), r = [a];
-    } else e >= 32 && e <= 127 && (r = t === 0 ? [e] : [e, t]);
-    return r && this.logger.log(3, () => "Char codes =  " + Gr(r).join(",")), r;
+      s === 17 ? a = t + 80 : s === 18 ? a = t + 112 : a = t + 144, this.logger.log(2, () => "Special char '" + V2(a) + "' in channel " + n), i = [a];
+    } else e >= 32 && e <= 127 && (i = t === 0 ? [e] : [e, t]);
+    return i && this.logger.log(3, () => "Char codes =  " + Gi(i).join(",")), i;
   }
   /**
    * Parse extended background attributes as well as new foreground color black.
    * @returns True if background attributes are found
    */
   parseBackgroundAttributes(e, t) {
-    const n = (e === 16 || e === 24) && t >= 32 && t <= 47, r = (e === 23 || e === 31) && t >= 45 && t <= 47;
-    if (!(n || r))
+    const n = (e === 16 || e === 24) && t >= 32 && t <= 47, i = (e === 23 || e === 31) && t >= 45 && t <= 47;
+    if (!(n || i))
       return !1;
     let s;
     const a = {};
-    e === 16 || e === 24 ? (s = Math.floor((t - 32) / 2), a.background = L9[s], t % 2 === 1 && (a.background = a.background + "_semi")) : t === 45 ? a.background = "transparent" : (a.foreground = "black", t === 47 && (a.underline = !0));
+    e === 16 || e === 24 ? (s = Math.floor((t - 32) / 2), a.background = Lw[s], t % 2 === 1 && (a.background = a.background + "_semi")) : t === 45 ? a.background = "transparent" : (a.foreground = "black", t === 47 && (a.underline = !0));
     const o = e <= 23 ? 1 : 2;
     return this.channels[o].setBkgData(a), !0;
   }
@@ -38353,13 +38353,13 @@ class U1 {
     }
   }
 }
-function Ko(i, e, t) {
-  t.a = i, t.b = e;
+function Ko(r, e, t) {
+  t.a = r, t.b = e;
 }
-function P9(i, e, t) {
-  return t.a === i && t.b === e;
+function Pw(r, e, t) {
+  return t.a === r && t.b === e;
 }
-function M9() {
+function Mw() {
   return {
     a: null,
     b: null
@@ -38368,7 +38368,7 @@ function M9() {
 var dd = function() {
   if (Vl != null && Vl.VTTCue)
     return self.VTTCue;
-  const i = ["", "lr", "rl"], e = ["start", "middle", "end", "left", "right"];
+  const r = ["", "lr", "rl"], e = ["start", "middle", "end", "left", "right"];
   function t(o, l) {
     if (typeof l != "string" || !Array.isArray(o))
       return !1;
@@ -38376,9 +38376,9 @@ var dd = function() {
     return ~o.indexOf(u) ? u : !1;
   }
   function n(o) {
-    return t(i, o);
+    return t(r, o);
   }
-  function r(o) {
+  function i(o) {
     return t(e, o);
   }
   function s(o, ...l) {
@@ -38473,7 +38473,7 @@ var dd = function() {
         return A;
       },
       set: function(R) {
-        const M = r(R);
+        const M = i(R);
         if (!M)
           throw new SyntaxError("An invalid or illegal string was specified.");
         A = M, this.hasBeenReset = !0;
@@ -38492,7 +38492,7 @@ var dd = function() {
         return D;
       },
       set: function(R) {
-        const M = r(R);
+        const M = i(R);
         if (!M)
           throw new SyntaxError("An invalid or illegal string was specified.");
         D = M, this.hasBeenReset = !0;
@@ -38511,7 +38511,7 @@ var dd = function() {
         return I;
       },
       set: function(R) {
-        const M = r(R);
+        const M = i(R);
         if (!M)
           throw new SyntaxError("An invalid or illegal string was specified.");
         I = M, this.hasBeenReset = !0;
@@ -38522,7 +38522,7 @@ var dd = function() {
     return self.WebVTT.convertCueToDOMTree(self, this.text);
   }, a;
 }();
-class O9 {
+class Ow {
   decode(e, t) {
     if (!e)
       return "";
@@ -38531,14 +38531,14 @@ class O9 {
     return decodeURIComponent(encodeURIComponent(e));
   }
 }
-function j2(i) {
-  function e(n, r, s, a) {
-    return (n | 0) * 3600 + (r | 0) * 60 + (s | 0) + parseFloat(a || 0);
+function j2(r) {
+  function e(n, i, s, a) {
+    return (n | 0) * 3600 + (i | 0) * 60 + (s | 0) + parseFloat(a || 0);
   }
-  const t = i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);
+  const t = r.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);
   return t ? parseFloat(t[2]) > 59 ? e(t[2], t[3], 0, t[4]) : e(t[1], t[2], t[3], t[4]) : null;
 }
-class B9 {
+class Bw {
   constructor() {
     this.values = /* @__PURE__ */ Object.create(null);
   }
@@ -38560,8 +38560,8 @@ class B9 {
   }
   // Accept a setting if its one of the given alternatives.
   alt(e, t, n) {
-    for (let r = 0; r < n.length; ++r)
-      if (t === n[r]) {
+    for (let i = 0; i < n.length; ++i)
+      if (t === n[i]) {
         this.set(e, t);
         break;
       }
@@ -38580,12 +38580,12 @@ class B9 {
     return !1;
   }
 }
-function W2(i, e, t, n) {
-  const r = n ? i.split(n) : [i];
-  for (const s in r) {
-    if (typeof r[s] != "string")
+function W2(r, e, t, n) {
+  const i = n ? r.split(n) : [r];
+  for (const s in i) {
+    if (typeof i[s] != "string")
       continue;
-    const a = r[s].split(t);
+    const a = i[s].split(t);
     if (a.length !== 2)
       continue;
     const o = a[0], l = a[1];
@@ -38593,16 +38593,16 @@ function W2(i, e, t, n) {
   }
 }
 const Yc = new dd(0, 0, ""), jo = Yc.align === "middle" ? "middle" : "center";
-function N9(i, e, t) {
-  const n = i;
-  function r() {
-    const o = j2(i);
+function Nw(r, e, t) {
+  const n = r;
+  function i() {
+    const o = j2(r);
     if (o === null)
       throw new Error("Malformed timestamp: " + n);
-    return i = i.replace(/^[^\sa-zA-Z-]+/, ""), o;
+    return r = r.replace(/^[^\sa-zA-Z-]+/, ""), o;
   }
   function s(o, l) {
-    const u = new B9();
+    const u = new Bw();
     W2(o, function(d, f) {
       let m;
       switch (d) {
@@ -38636,19 +38636,19 @@ function N9(i, e, t) {
     h === "auto" && Yc.position === 50 && (h = l.align === "start" || l.align === "left" ? 0 : l.align === "end" || l.align === "right" ? 100 : 50), l.position = h;
   }
   function a() {
-    i = i.replace(/^\s+/, "");
+    r = r.replace(/^\s+/, "");
   }
-  if (a(), e.startTime = r(), a(), i.slice(0, 3) !== "-->")
+  if (a(), e.startTime = i(), a(), r.slice(0, 3) !== "-->")
     throw new Error("Malformed time stamp (time stamps must be separated by '-->'): " + n);
-  i = i.slice(3), a(), e.endTime = r(), a(), s(i, e);
+  r = r.slice(3), a(), e.endTime = i(), a(), s(r, e);
 }
-function Y2(i) {
-  return i.replace(//gi, `
+function Y2(r) {
+  return r.replace(//gi, `
 `);
 }
-class $9 {
+class $w {
   constructor() {
-    this.state = "INITIAL", this.buffer = "", this.decoder = new O9(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0;
+    this.state = "INITIAL", this.buffer = "", this.decoder = new Ow(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0;
   }
   parse(e) {
     const t = this;
@@ -38664,7 +38664,7 @@ class $9 {
       return s[a] === "\r" && ++a, s[a] === `
 ` && ++a, t.buffer = s.slice(a), o;
     }
-    function r(s) {
+    function i(s) {
       W2(s, function(a, o) {
       }, /:/);
     }
@@ -38685,7 +38685,7 @@ class $9 {
           return this;
         switch (a ? a = !1 : s = n(), t.state) {
           case "HEADER":
-            /:/.test(s) ? r(s) : s || (t.state = "ID");
+            /:/.test(s) ? i(s) : s || (t.state = "ID");
             continue;
           case "NOTE":
             s || (t.state = "ID");
@@ -38707,7 +38707,7 @@ class $9 {
               continue;
             }
             try {
-              N9(s, t.cue, t.regionList);
+              Nw(s, t.cue, t.regionList);
             } catch {
               t.cue = null, t.state = "BADCUE";
               continue;
@@ -38749,32 +38749,32 @@ class $9 {
     return e.onflush && e.onflush(), this;
   }
 }
-const U9 = /\r\n|\n\r|\n|\r/g, qu = function(e, t, n = 0) {
+const Uw = /\r\n|\n\r|\n|\r/g, qu = function(e, t, n = 0) {
   return e.slice(n, n + t.length) === t;
-}, H9 = function(e) {
+}, Hw = function(e) {
   let t = parseInt(e.slice(-3));
-  const n = parseInt(e.slice(-6, -4)), r = parseInt(e.slice(-9, -7)), s = e.length > 9 ? parseInt(e.substring(0, e.indexOf(":"))) : 0;
-  if (!oe(t) || !oe(n) || !oe(r) || !oe(s))
+  const n = parseInt(e.slice(-6, -4)), i = parseInt(e.slice(-9, -7)), s = e.length > 9 ? parseInt(e.substring(0, e.indexOf(":"))) : 0;
+  if (!oe(t) || !oe(n) || !oe(i) || !oe(s))
     throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);
-  return t += 1e3 * n, t += 60 * 1e3 * r, t += 60 * 60 * 1e3 * s, t;
+  return t += 1e3 * n, t += 60 * 1e3 * i, t += 60 * 60 * 1e3 * s, t;
 };
-function fd(i, e, t) {
-  return Ca(i.toString()) + Ca(e.toString()) + Ca(t);
+function fd(r, e, t) {
+  return Ca(r.toString()) + Ca(e.toString()) + Ca(t);
 }
-const G9 = function(e, t, n) {
-  let r = e[t], s = e[r.prevCC];
-  if (!s || !s.new && r.new) {
-    e.ccOffset = e.presentationOffset = r.start, r.new = !1;
+const Gw = function(e, t, n) {
+  let i = e[t], s = e[i.prevCC];
+  if (!s || !s.new && i.new) {
+    e.ccOffset = e.presentationOffset = i.start, i.new = !1;
     return;
   }
   for (; (a = s) != null && a.new; ) {
     var a;
-    e.ccOffset += r.start - s.start, r.new = !1, r = s, s = e[r.prevCC];
+    e.ccOffset += i.start - s.start, i.new = !1, i = s, s = e[i.prevCC];
   }
   e.presentationOffset = n;
 };
-function z9(i, e, t, n, r, s, a) {
-  const o = new $9(), l = On(new Uint8Array(i)).trim().replace(U9, `
+function zw(r, e, t, n, i, s, a) {
+  const o = new $w(), l = On(new Uint8Array(r)).trim().replace(Uw, `
 `).split(`
 `), u = [], c = e ? YA(e.baseTime, e.timescale) : 0;
   let h = "00:00.000", d = 0, f = 0, m, g = !0;
@@ -38782,14 +38782,14 @@ function z9(i, e, t, n, r, s, a) {
     const b = t[n];
     let y = t.ccOffset;
     const v = (d - c) / 9e4;
-    if (b != null && b.new && (f !== void 0 ? y = t.ccOffset = b.start : G9(t, n, v)), v) {
+    if (b != null && b.new && (f !== void 0 ? y = t.ccOffset = b.start : Gw(t, n, v)), v) {
       if (!e) {
         m = new Error("Missing initPTS for VTT MPEGTS");
         return;
       }
       y = v - t.presentationOffset;
     }
-    const T = p.endTime - p.startTime, A = In((p.startTime + y - f) * 9e4, r * 9e4) / 9e4;
+    const T = p.endTime - p.startTime, A = In((p.startTime + y - f) * 9e4, i * 9e4) / 9e4;
     p.startTime = Math.max(A, 0), p.endTime = Math.max(A + T, 0);
     const w = p.text.trim();
     p.text = decodeURIComponent(encodeURIComponent(w)), p.id || (p.id = fd(p.startTime, p.endTime, w)), p.endTime > 0 && u.push(p);
@@ -38808,7 +38808,7 @@ function z9(i, e, t, n, r, s, a) {
           qu(b, "LOCAL:") ? h = b.slice(6) : qu(b, "MPEGTS:") && (d = parseInt(b.slice(7)));
         });
         try {
-          f = H9(h) / 1e3;
+          f = Hw(h) / 1e3;
         } catch (b) {
           m = b;
         }
@@ -38818,36 +38818,36 @@ function z9(i, e, t, n, r, s, a) {
 `);
   }), o.flush();
 }
-const Vu = "stpp.ttml.im1t", X2 = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/, Q2 = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/, q9 = {
+const Vu = "stpp.ttml.im1t", X2 = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/, Q2 = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/, qw = {
   left: "start",
   center: "center",
   right: "end",
   start: "start",
   end: "end"
 };
-function H1(i, e, t, n) {
-  const r = Pe(new Uint8Array(i), ["mdat"]);
-  if (r.length === 0) {
+function H1(r, e, t, n) {
+  const i = Pe(new Uint8Array(r), ["mdat"]);
+  if (i.length === 0) {
     n(new Error("Could not parse IMSC1 mdat"));
     return;
   }
-  const s = r.map((o) => On(o)), a = WA(e.baseTime, 1, e.timescale);
+  const s = i.map((o) => On(o)), a = WA(e.baseTime, 1, e.timescale);
   try {
-    s.forEach((o) => t(V9(o, a)));
+    s.forEach((o) => t(Vw(o, a)));
   } catch (o) {
     n(o);
   }
 }
-function V9(i, e) {
-  const r = new DOMParser().parseFromString(i, "text/xml").getElementsByTagName("tt")[0];
-  if (!r)
+function Vw(r, e) {
+  const i = new DOMParser().parseFromString(r, "text/xml").getElementsByTagName("tt")[0];
+  if (!i)
     throw new Error("Invalid ttml");
   const s = {
     frameRate: 30,
     subFrameRate: 1,
     frameRateMultiplier: 0,
     tickRate: 0
-  }, a = Object.keys(s).reduce((h, d) => (h[d] = r.getAttribute(`ttp:${d}`) || s[d], h), {}), o = r.getAttribute("xml:space") !== "preserve", l = G1(Ku(r, "styling", "style")), u = G1(Ku(r, "layout", "region")), c = Ku(r, "body", "[begin]");
+  }, a = Object.keys(s).reduce((h, d) => (h[d] = i.getAttribute(`ttp:${d}`) || s[d], h), {}), o = i.getAttribute("xml:space") !== "preserve", l = G1(Ku(i, "styling", "style")), u = G1(Ku(i, "layout", "region")), c = Ku(i, "body", "[begin]");
   return [].map.call(c, (h) => {
     const d = Z2(h, o);
     if (!d || !h.hasAttribute("begin"))
@@ -38863,36 +38863,36 @@ function V9(i, e) {
     }
     const p = new dd(f - e, g - e, d);
     p.id = fd(p.startTime, p.endTime, p.text);
-    const b = u[h.getAttribute("region")], y = l[h.getAttribute("style")], v = K9(b, y, l), {
+    const b = u[h.getAttribute("region")], y = l[h.getAttribute("style")], v = Kw(b, y, l), {
       textAlign: T
     } = v;
     if (T) {
-      const A = q9[T];
+      const A = qw[T];
       A && (p.lineAlign = A), p.align = T;
     }
     return Qe(p, v), p;
   }).filter((h) => h !== null);
 }
-function Ku(i, e, t) {
-  const n = i.getElementsByTagName(e)[0];
+function Ku(r, e, t) {
+  const n = r.getElementsByTagName(e)[0];
   return n ? [].slice.call(n.querySelectorAll(t)) : [];
 }
-function G1(i) {
-  return i.reduce((e, t) => {
+function G1(r) {
+  return r.reduce((e, t) => {
     const n = t.getAttribute("xml:id");
     return n && (e[n] = t), e;
   }, {});
 }
-function Z2(i, e) {
-  return [].slice.call(i.childNodes).reduce((t, n, r) => {
+function Z2(r, e) {
+  return [].slice.call(r.childNodes).reduce((t, n, i) => {
     var s;
-    return n.nodeName === "br" && r ? t + `
+    return n.nodeName === "br" && i ? t + `
 ` : (s = n.childNodes) != null && s.length ? Z2(n, e) : e ? t + n.textContent.trim().replace(/\s+/g, " ") : t + n.textContent;
   }, "");
 }
-function K9(i, e, t) {
+function Kw(r, e, t) {
   const n = "http://www.w3.org/ns/ttml#styling";
-  let r = null;
+  let i = null;
   const s = [
     "displayAlign",
     "textAlign",
@@ -38906,30 +38906,30 @@ function K9(i, e, t) {
     // 'fontStyle',
     // 'direction',
     // 'writingMode'
-  ], a = i != null && i.hasAttribute("style") ? i.getAttribute("style") : null;
-  return a && t.hasOwnProperty(a) && (r = t[a]), s.reduce((o, l) => {
-    const u = ju(e, n, l) || ju(i, n, l) || ju(r, n, l);
+  ], a = r != null && r.hasAttribute("style") ? r.getAttribute("style") : null;
+  return a && t.hasOwnProperty(a) && (i = t[a]), s.reduce((o, l) => {
+    const u = ju(e, n, l) || ju(r, n, l) || ju(i, n, l);
     return u && (o[l] = u), o;
   }, {});
 }
-function ju(i, e, t) {
-  return i && i.hasAttributeNS(e, t) ? i.getAttributeNS(e, t) : null;
+function ju(r, e, t) {
+  return r && r.hasAttributeNS(e, t) ? r.getAttributeNS(e, t) : null;
 }
-function z1(i) {
-  return new Error(`Could not parse ttml timestamp ${i}`);
+function z1(r) {
+  return new Error(`Could not parse ttml timestamp ${r}`);
 }
-function Wu(i, e) {
-  if (!i)
+function Wu(r, e) {
+  if (!r)
     return null;
-  let t = j2(i);
-  return t === null && (X2.test(i) ? t = j9(i, e) : Q2.test(i) && (t = W9(i, e))), t;
+  let t = j2(r);
+  return t === null && (X2.test(r) ? t = jw(r, e) : Q2.test(r) && (t = Ww(r, e))), t;
 }
-function j9(i, e) {
-  const t = X2.exec(i), n = (t[4] | 0) + (t[5] | 0) / e.subFrameRate;
+function jw(r, e) {
+  const t = X2.exec(r), n = (t[4] | 0) + (t[5] | 0) / e.subFrameRate;
   return (t[1] | 0) * 3600 + (t[2] | 0) * 60 + (t[3] | 0) + n / e.frameRate;
 }
-function W9(i, e) {
-  const t = Q2.exec(i), n = Number(t[1]);
+function Ww(r, e) {
+  const t = Q2.exec(r), n = Number(t[1]);
   switch (t[2]) {
     case "h":
       return n * 3600;
@@ -38958,7 +38958,7 @@ class Wo {
     this.cueRanges = [], this.startTime = null;
   }
 }
-class Y9 {
+class Yw {
   constructor(e) {
     this.hls = void 0, this.media = null, this.config = void 0, this.enabled = !0, this.Cues = void 0, this.textTracks = [], this.tracks = [], this.initPTS = [], this.unparsedVttFrags = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.cea608Parser1 = void 0, this.cea608Parser2 = void 0, this.lastCc = -1, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = V1(), this.captionsProperties = void 0, this.hls = e, this.config = e.config, this.Cues = e.config.cueHandler, this.captionsProperties = {
       textTrack1: {
@@ -38986,21 +38986,21 @@ class Y9 {
     e.off(S.MEDIA_ATTACHING, this.onMediaAttaching, this), e.off(S.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(S.MANIFEST_LOADING, this.onManifestLoading, this), e.off(S.MANIFEST_LOADED, this.onManifestLoaded, this), e.off(S.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.off(S.FRAG_LOADING, this.onFragLoading, this), e.off(S.FRAG_LOADED, this.onFragLoaded, this), e.off(S.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this), e.off(S.FRAG_DECRYPTED, this.onFragDecrypted, this), e.off(S.INIT_PTS_FOUND, this.onInitPtsFound, this), e.off(S.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this), e.off(S.BUFFER_FLUSHING, this.onBufferFlushing, this), this.hls = this.config = this.media = null, this.cea608Parser1 = this.cea608Parser2 = void 0;
   }
   initCea608Parsers() {
-    const e = new Wo(this, "textTrack1"), t = new Wo(this, "textTrack2"), n = new Wo(this, "textTrack3"), r = new Wo(this, "textTrack4");
-    this.cea608Parser1 = new U1(1, e, t), this.cea608Parser2 = new U1(3, n, r);
+    const e = new Wo(this, "textTrack1"), t = new Wo(this, "textTrack2"), n = new Wo(this, "textTrack3"), i = new Wo(this, "textTrack4");
+    this.cea608Parser1 = new U1(1, e, t), this.cea608Parser2 = new U1(3, n, i);
   }
-  addCues(e, t, n, r, s) {
+  addCues(e, t, n, i, s) {
     let a = !1;
     for (let o = s.length; o--; ) {
-      const l = s[o], u = X9(l[0], l[1], t, n);
+      const l = s[o], u = Xw(l[0], l[1], t, n);
       if (u >= 0 && (l[0] = Math.min(l[0], t), l[1] = Math.max(l[1], n), a = !0, u / (n - t) > 0.5))
         return;
     }
     if (a || s.push([t, n]), this.config.renderTextTracksNatively) {
       const o = this.captionsTracks[e];
-      this.Cues.newCue(o, t, n, r);
+      this.Cues.newCue(o, t, n, i);
     } else {
-      const o = this.Cues.newCue(null, t, n, r);
+      const o = this.Cues.newCue(null, t, n, i);
       this.hls.trigger(S.CUES_PARSED, {
         type: "captions",
         cues: o,
@@ -39012,7 +39012,7 @@ class Y9 {
   onInitPtsFound(e, {
     frag: t,
     id: n,
-    initPTS: r,
+    initPTS: i,
     timescale: s,
     trackId: a
   }) {
@@ -39020,7 +39020,7 @@ class Y9 {
       unparsedVttFrags: o
     } = this;
     n === ce.MAIN && (this.initPTS[t.cc] = {
-      baseTime: r,
+      baseTime: i,
       timescale: s,
       trackId: a
     }), o.length && (this.unparsedVttFrags = [], o.forEach((l) => {
@@ -39036,8 +39036,8 @@ class Y9 {
       media: n
     } = this;
     if (n)
-      for (let r = 0; r < n.textTracks.length; r++) {
-        const s = n.textTracks[r];
+      for (let i = 0; i < n.textTracks.length; i++) {
+        const s = n.textTracks[i];
         if (q1(s, {
           name: e,
           lang: t,
@@ -39056,13 +39056,13 @@ class Y9 {
     const {
       captionsProperties: t,
       captionsTracks: n,
-      media: r
+      media: i
     } = this, {
       label: s,
       languageCode: a
     } = t[e], o = this.getExistingTrack(s, a);
     if (o)
-      n[e] = o, Ms(n[e]), G2(n[e], r);
+      n[e] = o, Ms(n[e]), G2(n[e], i);
     else {
       const l = this.createTextTrack("captions", s, a);
       l && (l[e] = !0, n[e] = l);
@@ -39074,21 +39074,21 @@ class Y9 {
     const t = this.captionsProperties[e];
     if (!t)
       return;
-    const n = t.label, r = {
+    const n = t.label, i = {
       _id: e,
       label: n,
       kind: "captions",
       default: t.media ? !!t.media.default : !1,
       closedCaptions: t.media
     };
-    this.nonNativeCaptionsTracks[e] = r, this.hls.trigger(S.NON_NATIVE_TEXT_TRACKS_FOUND, {
-      tracks: [r]
+    this.nonNativeCaptionsTracks[e] = i, this.hls.trigger(S.NON_NATIVE_TEXT_TRACKS_FOUND, {
+      tracks: [i]
     });
   }
   createTextTrack(e, t, n) {
-    const r = this.media;
-    if (r)
-      return r.addTextTrack(e, t, n);
+    const i = this.media;
+    if (i)
+      return i.addTextTrack(e, t, n);
   }
   onMediaAttaching(e, t) {
     this.media = t.media, t.mediaSource || this._cleanTracks();
@@ -39098,10 +39098,10 @@ class Y9 {
     if (this.media = null, n)
       return;
     const {
-      captionsTracks: r
+      captionsTracks: i
     } = this;
-    Object.keys(r).forEach((s) => {
-      Ms(r[s]), delete r[s];
+    Object.keys(i).forEach((s) => {
+      Ms(i[s]), delete i[s];
     }), this.nonNativeCaptionsTracks = {};
   }
   onManifestLoading() {
@@ -39119,8 +39119,8 @@ class Y9 {
         Ms(t[n]);
   }
   onSubtitleTracksUpdated(e, t) {
-    const n = t.subtitleTracks || [], r = n.some((s) => s.textCodec === Vu);
-    if (this.config.enableWebVTT || r && this.config.enableIMSC1) {
+    const n = t.subtitleTracks || [], i = n.some((s) => s.textCodec === Vu);
+    if (this.config.enableWebVTT || i && this.config.enableIMSC1) {
       if (I2(this.tracks, n)) {
         this.tracks = n;
         return;
@@ -39164,10 +39164,10 @@ class Y9 {
   }
   onManifestLoaded(e, t) {
     this.config.enableCEA708Captions && t.captions && t.captions.forEach((n) => {
-      const r = /(?:CC|SERVICE)([1-4])/.exec(n.instreamId);
-      if (!r)
+      const i = /(?:CC|SERVICE)([1-4])/.exec(n.instreamId);
+      if (!i)
         return;
-      const s = `textTrack${r[1]}`, a = this.captionsProperties[s];
+      const s = `textTrack${i[1]}`, a = this.captionsProperties[s];
       a && (a.label = n.name, n.lang && (a.languageCode = n.lang), a.media = n);
     });
   }
@@ -39177,7 +39177,7 @@ class Y9 {
   }
   onFragLoading(e, t) {
     if (this.enabled && t.frag.type === ce.MAIN) {
-      var n, r;
+      var n, i;
       const {
         cea608Parser1: s,
         cea608Parser2: a,
@@ -39185,17 +39185,17 @@ class Y9 {
       } = this, {
         cc: l,
         sn: u
-      } = t.frag, c = (n = (r = t.part) == null ? void 0 : r.index) != null ? n : -1;
+      } = t.frag, c = (n = (i = t.part) == null ? void 0 : i.index) != null ? n : -1;
       s && a && (u !== o + 1 || u === o && c !== this.lastPartIndex + 1 || l !== this.lastCc) && (s.reset(), a.reset()), this.lastCc = l, this.lastSn = u, this.lastPartIndex = c;
     }
   }
   onFragLoaded(e, t) {
     const {
       frag: n,
-      payload: r
+      payload: i
     } = t;
     if (n.type === ce.SUBTITLE)
-      if (r.byteLength) {
+      if (i.byteLength) {
         const s = n.decryptdata, a = "stats" in t;
         if (s == null || !s.encrypted || a) {
           const o = this.tracks[n.level], l = this.vttCCs;
@@ -39203,7 +39203,7 @@ class Y9 {
             start: n.start,
             prevCC: this.prevCC,
             new: !0
-          }, this.prevCC = n.cc), o && o.textCodec === Vu ? this._parseIMSC1(n, r) : this._parseVTTs(t);
+          }, this.prevCC = n.cc), o && o.textCodec === Vu ? this._parseIMSC1(n, i) : this._parseVTTs(t);
         }
       } else
         this.hls.trigger(S.SUBTITLE_FRAG_PROCESSED, {
@@ -39214,16 +39214,16 @@ class Y9 {
   }
   _parseIMSC1(e, t) {
     const n = this.hls;
-    H1(t, this.initPTS[e.cc], (r) => {
-      this._appendCues(r, e.level), n.trigger(S.SUBTITLE_FRAG_PROCESSED, {
+    H1(t, this.initPTS[e.cc], (i) => {
+      this._appendCues(i, e.level), n.trigger(S.SUBTITLE_FRAG_PROCESSED, {
         success: !0,
         frag: e
       });
-    }, (r) => {
-      n.logger.log(`Failed to parse IMSC1: ${r}`), n.trigger(S.SUBTITLE_FRAG_PROCESSED, {
+    }, (i) => {
+      n.logger.log(`Failed to parse IMSC1: ${i}`), n.trigger(S.SUBTITLE_FRAG_PROCESSED, {
         success: !1,
         frag: e,
-        error: r
+        error: i
       });
     });
   }
@@ -39231,7 +39231,7 @@ class Y9 {
     var t;
     const {
       frag: n,
-      payload: r
+      payload: i
     } = e, {
       initPTS: s,
       unparsedVttFrags: a
@@ -39240,15 +39240,15 @@ class Y9 {
       a.push(e);
       return;
     }
-    const l = this.hls, u = (t = n.initSegment) != null && t.data ? Zn(n.initSegment.data, new Uint8Array(r)).buffer : r;
-    z9(u, this.initPTS[n.cc], this.vttCCs, n.cc, n.start, (c) => {
+    const l = this.hls, u = (t = n.initSegment) != null && t.data ? Zn(n.initSegment.data, new Uint8Array(i)).buffer : i;
+    zw(u, this.initPTS[n.cc], this.vttCCs, n.cc, n.start, (c) => {
       this._appendCues(c, n.level), l.trigger(S.SUBTITLE_FRAG_PROCESSED, {
         success: !0,
         frag: n
       });
     }, (c) => {
       const h = c.message === "Missing initPTS for VTT MPEGTS";
-      h ? a.push(e) : this._fallbackToIMSC1(n, r), l.logger.log(`Failed to parse VTT cue: ${c}`), !(h && o > n.cc) && l.trigger(S.SUBTITLE_FRAG_PROCESSED, {
+      h ? a.push(e) : this._fallbackToIMSC1(n, i), l.logger.log(`Failed to parse VTT cue: ${c}`), !(h && o > n.cc) && l.trigger(S.SUBTITLE_FRAG_PROCESSED, {
         success: !1,
         frag: n,
         error: c
@@ -39266,15 +39266,15 @@ class Y9 {
   _appendCues(e, t) {
     const n = this.hls;
     if (this.config.renderTextTracksNatively) {
-      const r = this.textTracks[t];
-      if (!r || r.mode === "disabled")
+      const i = this.textTracks[t];
+      if (!i || i.mode === "disabled")
         return;
-      e.forEach((s) => z2(r, s));
+      e.forEach((s) => z2(i, s));
     } else {
-      const r = this.tracks[t];
-      if (!r)
+      const i = this.tracks[t];
+      if (!i)
         return;
-      const s = r.default ? "default" : "subtitles" + t;
+      const s = i.default ? "default" : "subtitles" + t;
       n.trigger(S.CUES_PARSED, {
         type: "subtitles",
         cues: e,
@@ -39296,22 +39296,22 @@ class Y9 {
       return;
     const {
       frag: n,
-      samples: r
+      samples: i
     } = t;
     if (!(n.type === ce.MAIN && this.closedCaptionsForLevel(n) === "NONE"))
-      for (let s = 0; s < r.length; s++) {
-        const a = r[s].bytes;
+      for (let s = 0; s < i.length; s++) {
+        const a = i[s].bytes;
         if (a) {
           this.cea608Parser1 || this.initCea608Parsers();
           const o = this.extractCea608Data(a);
-          this.cea608Parser1.addData(r[s].pts, o[0]), this.cea608Parser2.addData(r[s].pts, o[1]);
+          this.cea608Parser1.addData(i[s].pts, o[0]), this.cea608Parser2.addData(i[s].pts, o[1]);
         }
       }
   }
   onBufferFlushing(e, {
     startOffset: t,
     endOffset: n,
-    endOffsetSubtitles: r,
+    endOffsetSubtitles: i,
     type: s
   }) {
     const {
@@ -39324,19 +39324,19 @@ class Y9 {
         } = this;
         Object.keys(o).forEach((l) => Wc(o[l], t, n));
       }
-      if (this.config.renderTextTracksNatively && t === 0 && r !== void 0) {
+      if (this.config.renderTextTracksNatively && t === 0 && i !== void 0) {
         const {
           textTracks: o
         } = this;
-        Object.keys(o).forEach((l) => Wc(o[l], t, r));
+        Object.keys(o).forEach((l) => Wc(o[l], t, i));
       }
     }
   }
   extractCea608Data(e) {
     const t = [[], []], n = e[0] & 31;
-    let r = 2;
+    let i = 2;
     for (let s = 0; s < n; s++) {
-      const a = e[r++], o = 127 & e[r++], l = 127 & e[r++];
+      const a = e[i++], o = 127 & e[i++], l = 127 & e[i++];
       if (o === 0 && l === 0)
         continue;
       if ((4 & a) !== 0) {
@@ -39347,14 +39347,14 @@ class Y9 {
     return t;
   }
 }
-function J2(i) {
-  return i.characteristics && /transcribes-spoken-dialog/gi.test(i.characteristics) && /describes-music-and-sound/gi.test(i.characteristics) ? "captions" : "subtitles";
+function J2(r) {
+  return r.characteristics && /transcribes-spoken-dialog/gi.test(r.characteristics) && /describes-music-and-sound/gi.test(r.characteristics) ? "captions" : "subtitles";
 }
-function q1(i, e) {
-  return !!i && i.kind === J2(e) && qc(e, i);
+function q1(r, e) {
+  return !!r && r.kind === J2(e) && qc(e, r);
 }
-function X9(i, e, t, n) {
-  return Math.min(e, n) - Math.max(i, t);
+function Xw(r, e, t, n) {
+  return Math.min(e, n) - Math.max(r, t);
 }
 function V1() {
   return {
@@ -39367,24 +39367,24 @@ function V1() {
     }
   };
 }
-const Q9 = /\s/, Z9 = {
-  newCue(i, e, t, n) {
-    const r = [];
+const Qw = /\s/, Zw = {
+  newCue(r, e, t, n) {
+    const i = [];
     let s, a, o, l, u;
     const c = self.VTTCue || self.TextTrackCue;
     for (let d = 0; d < n.rows.length; d++)
       if (s = n.rows[d], o = !0, l = 0, u = "", !s.isEmpty()) {
         var h;
         for (let g = 0; g < s.chars.length; g++)
-          Q9.test(s.chars[g].uchar) && o ? l++ : (u += s.chars[g].uchar, o = !1);
+          Qw.test(s.chars[g].uchar) && o ? l++ : (u += s.chars[g].uchar, o = !1);
         s.cueStartTime = e, e === t && (t += 1e-4), l >= 16 ? l-- : l++;
         const f = Y2(u.trim()), m = fd(e, t, f);
-        i != null && (h = i.cues) != null && h.getCueById(m) || (a = new c(e, t, f), a.id = m, a.line = d + 1, a.align = "left", a.position = 10 + Math.min(80, Math.floor(l * 8 / 32) * 10), r.push(a));
+        r != null && (h = r.cues) != null && h.getCueById(m) || (a = new c(e, t, f), a.id = m, a.line = d + 1, a.align = "left", a.position = 10 + Math.min(80, Math.floor(l * 8 / 32) * 10), i.push(a));
       }
-    return i && r.length && (r.sort((d, f) => d.line === "auto" || f.line === "auto" ? 0 : d.line > 8 && f.line > 8 ? f.line - d.line : d.line - f.line), r.forEach((d) => z2(i, d))), r;
+    return r && i.length && (i.sort((d, f) => d.line === "auto" || f.line === "auto" ? 0 : d.line > 8 && f.line > 8 ? f.line - d.line : d.line - f.line), i.forEach((d) => z2(r, d))), i;
   }
 };
-function J9() {
+function Jw() {
   if (
     // @ts-ignore
     self.fetch && self.AbortController && self.ReadableStream && self.Request
@@ -39395,10 +39395,10 @@ function J9() {
     }
   return !1;
 }
-const ew = /(\d+)-(\d+)\/(\d+)/;
+const e9 = /(\d+)-(\d+)\/(\d+)/;
 class K1 {
   constructor(e) {
-    this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = null, this.response = null, this.controller = void 0, this.context = null, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = e.fetchSetup || rw, this.controller = new self.AbortController(), this.stats = new Vh();
+    this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = null, this.response = null, this.controller = void 0, this.context = null, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = e.fetchSetup || i9, this.controller = new self.AbortController(), this.stats = new Vh();
   }
   destroy() {
     this.loader = this.callbacks = this.context = this.config = this.request = null, this.abortInternal(), this.response = null, this.fetchSetup = this.controller = this.stats = null;
@@ -39411,55 +39411,55 @@ class K1 {
     this.abortInternal(), (e = this.callbacks) != null && e.onAbort && this.callbacks.onAbort(this.stats, this.context, this.response);
   }
   load(e, t, n) {
-    const r = this.stats;
-    if (r.loading.start)
+    const i = this.stats;
+    if (i.loading.start)
       throw new Error("Loader can only be used once.");
-    r.loading.start = self.performance.now();
-    const s = tw(e, this.controller.signal), a = e.responseType === "arraybuffer", o = a ? "byteLength" : "length", {
+    i.loading.start = self.performance.now();
+    const s = t9(e, this.controller.signal), a = e.responseType === "arraybuffer", o = a ? "byteLength" : "length", {
       maxTimeToFirstByteMs: l,
       maxLoadTimeMs: u
     } = t.loadPolicy;
     this.context = e, this.config = t, this.callbacks = n, this.request = this.fetchSetup(e, s), self.clearTimeout(this.requestTimeout), t.timeout = l && oe(l) ? l : u, this.requestTimeout = self.setTimeout(() => {
-      this.callbacks && (this.abortInternal(), this.callbacks.onTimeout(r, e, this.response));
+      this.callbacks && (this.abortInternal(), this.callbacks.onTimeout(i, e, this.response));
     }, t.timeout), (Ya(this.request) ? this.request.then(self.fetch) : self.fetch(this.request)).then((h) => {
       var d;
       this.response = this.loader = h;
-      const f = Math.max(self.performance.now(), r.loading.start);
+      const f = Math.max(self.performance.now(), i.loading.start);
       if (self.clearTimeout(this.requestTimeout), t.timeout = u, this.requestTimeout = self.setTimeout(() => {
-        this.callbacks && (this.abortInternal(), this.callbacks.onTimeout(r, e, this.response));
-      }, u - (f - r.loading.start)), !h.ok) {
+        this.callbacks && (this.abortInternal(), this.callbacks.onTimeout(i, e, this.response));
+      }, u - (f - i.loading.start)), !h.ok) {
         const {
           status: g,
           statusText: p
         } = h;
-        throw new sw(p || "fetch, bad network response", g, h);
+        throw new s9(p || "fetch, bad network response", g, h);
       }
-      r.loading.first = f, r.total = iw(h.headers) || r.total;
+      i.loading.first = f, i.total = r9(h.headers) || i.total;
       const m = (d = this.callbacks) == null ? void 0 : d.onProgress;
-      return m && oe(t.highWaterMark) ? this.loadProgressively(h, r, e, t.highWaterMark, m) : a ? h.arrayBuffer() : e.responseType === "json" ? h.json() : h.text();
+      return m && oe(t.highWaterMark) ? this.loadProgressively(h, i, e, t.highWaterMark, m) : a ? h.arrayBuffer() : e.responseType === "json" ? h.json() : h.text();
     }).then((h) => {
       var d, f;
       const m = this.response;
       if (!m)
         throw new Error("loader destroyed");
-      self.clearTimeout(this.requestTimeout), r.loading.end = Math.max(self.performance.now(), r.loading.first);
+      self.clearTimeout(this.requestTimeout), i.loading.end = Math.max(self.performance.now(), i.loading.first);
       const g = h[o];
-      g && (r.loaded = r.total = g);
+      g && (i.loaded = i.total = g);
       const p = {
         url: m.url,
         data: h,
         code: m.status
       }, b = (d = this.callbacks) == null ? void 0 : d.onProgress;
-      b && !oe(t.highWaterMark) && b(r, e, h, m), (f = this.callbacks) == null || f.onSuccess(p, r, e, m);
+      b && !oe(t.highWaterMark) && b(i, e, h, m), (f = this.callbacks) == null || f.onSuccess(p, i, e, m);
     }).catch((h) => {
       var d;
-      if (self.clearTimeout(this.requestTimeout), r.aborted)
+      if (self.clearTimeout(this.requestTimeout), i.aborted)
         return;
       const f = h && h.code || 0, m = h ? h.message : null;
       (d = this.callbacks) == null || d.onError({
         code: f,
         text: m
-      }, e, h ? h.details : null, r);
+      }, e, h ? h.details : null, i);
     });
   }
   getCacheAge() {
@@ -39473,51 +39473,51 @@ class K1 {
   getResponseHeader(e) {
     return this.response ? this.response.headers.get(e) : null;
   }
-  loadProgressively(e, t, n, r = 0, s) {
+  loadProgressively(e, t, n, i = 0, s) {
     const a = new u2(), o = e.body.getReader(), l = () => o.read().then((u) => {
       if (u.done)
         return a.dataLength && s(t, n, a.flush().buffer, e), Promise.resolve(new ArrayBuffer(0));
       const c = u.value, h = c.length;
-      return t.loaded += h, h < r || a.dataLength ? (a.push(c), a.dataLength >= r && s(t, n, a.flush().buffer, e)) : s(t, n, c.buffer, e), l();
+      return t.loaded += h, h < i || a.dataLength ? (a.push(c), a.dataLength >= i && s(t, n, a.flush().buffer, e)) : s(t, n, c.buffer, e), l();
     }).catch(() => Promise.reject());
     return l();
   }
 }
-function tw(i, e) {
+function t9(r, e) {
   const t = {
     method: "GET",
     mode: "cors",
     credentials: "same-origin",
     signal: e,
-    headers: new self.Headers(Qe({}, i.headers))
+    headers: new self.Headers(Qe({}, r.headers))
   };
-  return i.rangeEnd && t.headers.set("Range", "bytes=" + i.rangeStart + "-" + String(i.rangeEnd - 1)), t;
+  return r.rangeEnd && t.headers.set("Range", "bytes=" + r.rangeStart + "-" + String(r.rangeEnd - 1)), t;
 }
-function nw(i) {
-  const e = ew.exec(i);
+function n9(r) {
+  const e = e9.exec(r);
   if (e)
     return parseInt(e[2]) - parseInt(e[1]) + 1;
 }
-function iw(i) {
-  const e = i.get("Content-Range");
+function r9(r) {
+  const e = r.get("Content-Range");
   if (e) {
-    const n = nw(e);
+    const n = n9(e);
     if (oe(n))
       return n;
   }
-  const t = i.get("Content-Length");
+  const t = r.get("Content-Length");
   if (t)
     return parseInt(t);
 }
-function rw(i, e) {
-  return new self.Request(i.url, e);
+function i9(r, e) {
+  return new self.Request(r.url, e);
 }
-class sw extends Error {
+class s9 extends Error {
   constructor(e, t, n) {
     super(e), this.code = void 0, this.details = void 0, this.code = t, this.details = n;
   }
 }
-const aw = /^age:\s*[\d.]+\s*$/im;
+const a9 = /^age:\s*[\d.]+\s*$/im;
 class e4 {
   constructor(e) {
     this.xhrSetup = void 0, this.requestTimeout = void 0, this.retryTimeout = void 0, this.retryDelay = void 0, this.config = null, this.callbacks = null, this.context = null, this.loader = null, this.stats = void 0, this.xhrSetup = e && e.xhrSetup || null, this.stats = new Vh(), this.retryDelay = 0;
@@ -39545,8 +39545,8 @@ class e4 {
     } = this;
     if (!e || !t)
       return;
-    const n = this.loader = new self.XMLHttpRequest(), r = this.stats;
-    r.loading.first = 0, r.loaded = 0, r.aborted = !1;
+    const n = this.loader = new self.XMLHttpRequest(), i = this.stats;
+    i.loading.first = 0, i.loaded = 0, i.aborted = !1;
     const s = this.xhrSetup;
     s ? Promise.resolve().then(() => {
       if (!(this.loader !== n || this.stats.aborted))
@@ -39561,18 +39561,18 @@ class e4 {
       (o = this.callbacks) == null || o.onError({
         code: n.status,
         text: a.message
-      }, t, n, r);
+      }, t, n, i);
     }) : this.openAndSendXhr(n, t, e);
   }
   openAndSendXhr(e, t, n) {
     e.readyState || e.open("GET", t.url, !0);
-    const r = t.headers, {
+    const i = t.headers, {
       maxTimeToFirstByteMs: s,
       maxLoadTimeMs: a
     } = n.loadPolicy;
-    if (r)
-      for (const o in r)
-        e.setRequestHeader(o, r[o]);
+    if (i)
+      for (const o in i)
+        e.setRequestHeader(o, i[o]);
     t.rangeEnd && e.setRequestHeader("Range", "bytes=" + t.rangeStart + "-" + (t.rangeEnd - 1)), e.onreadystatechange = this.readystatechange.bind(this), e.onprogress = this.loadprogress.bind(this), e.responseType = t.responseType, self.clearTimeout(this.requestTimeout), n.timeout = s && oe(s) ? s : a, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), n.timeout), e.send();
   }
   readystatechange() {
@@ -39583,8 +39583,8 @@ class e4 {
     } = this;
     if (!e || !t)
       return;
-    const r = t.readyState, s = this.config;
-    if (!n.aborted && r >= 2 && (n.loading.first === 0 && (n.loading.first = Math.max(self.performance.now(), n.loading.start), s.timeout !== s.loadPolicy.maxLoadTimeMs && (self.clearTimeout(this.requestTimeout), s.timeout = s.loadPolicy.maxLoadTimeMs, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), s.loadPolicy.maxLoadTimeMs - (n.loading.first - n.loading.start)))), r === 4)) {
+    const i = t.readyState, s = this.config;
+    if (!n.aborted && i >= 2 && (n.loading.first === 0 && (n.loading.first = Math.max(self.performance.now(), n.loading.start), s.timeout !== s.loadPolicy.maxLoadTimeMs && (self.clearTimeout(this.requestTimeout), s.timeout = s.loadPolicy.maxLoadTimeMs, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), s.loadPolicy.maxLoadTimeMs - (n.loading.first - n.loading.start)))), i === 4)) {
       self.clearTimeout(this.requestTimeout), t.onreadystatechange = null, t.onprogress = null;
       const u = t.status, c = t.responseType === "text" ? t.responseText : null;
       if (u >= 200 && u < 300) {
@@ -39629,8 +39629,8 @@ class e4 {
     else {
       var n;
       We.warn(`timeout while loading ${(n = this.context) == null ? void 0 : n.url}`);
-      const r = this.callbacks;
-      r && (this.abortInternal(), r.onTimeout(this.stats, this.context, this.loader));
+      const i = this.callbacks;
+      i && (this.abortInternal(), i.onTimeout(this.stats, this.context, this.loader));
     }
   }
   retry(e) {
@@ -39646,7 +39646,7 @@ class e4 {
   }
   getCacheAge() {
     let e = null;
-    if (this.loader && aw.test(this.loader.getAllResponseHeaders())) {
+    if (this.loader && a9.test(this.loader.getAllResponseHeaders())) {
       const t = this.loader.getResponseHeader("age");
       e = t ? parseFloat(t) : null;
     }
@@ -39656,12 +39656,12 @@ class e4 {
     return this.loader && new RegExp(`^${e}:\\s*[\\d.]+\\s*$`, "im").test(this.loader.getAllResponseHeaders()) ? this.loader.getResponseHeader(e) : null;
   }
 }
-const ow = {
+const o9 = {
   maxTimeToFirstByteMs: 8e3,
   maxLoadTimeMs: 2e4,
   timeoutRetry: null,
   errorRetry: null
-}, lw = je(je({
+}, l9 = je(je({
   autoStartLoad: !0,
   // used by stream-controller
   startPosition: -1,
@@ -39760,7 +39760,7 @@ const ow = {
   bufferController: cx,
   capLevelController: ud,
   errorController: xT,
-  fpsController: h9,
+  fpsController: hw,
   stretchShortVideoTrack: !1,
   // used by mp4-remuxer
   maxAudioFramesDrift: 1,
@@ -39817,7 +39817,7 @@ const ow = {
   useMediaCapabilities: !0,
   preserveManualLevelOnError: !1,
   certLoadPolicy: {
-    default: ow
+    default: o9
   },
   keyLoadPolicy: {
     default: {
@@ -39931,20 +39931,20 @@ const ow = {
   fragLoadingMaxRetry: 6,
   fragLoadingRetryDelay: 1e3,
   fragLoadingMaxRetryTimeout: 64e3
-}, uw()), {}, {
-  subtitleStreamController: T9,
-  subtitleTrackController: m9,
-  timelineController: Y9,
+}, u9()), {}, {
+  subtitleStreamController: Tw,
+  subtitleTrackController: mw,
+  timelineController: Yw,
   audioStreamController: ax,
   audioTrackController: ox,
   emeController: Hs,
-  cmcdController: o9,
-  contentSteeringController: u9,
-  interstitialsController: S9
+  cmcdController: ow,
+  contentSteeringController: uw,
+  interstitialsController: Sw
 });
-function uw() {
+function u9() {
   return {
-    cueHandler: Z9,
+    cueHandler: Zw,
     // used by timeline-controller
     enableWebVTT: !0,
     // used by timeline-controller
@@ -39971,15 +39971,15 @@ function uw() {
     renderTextTracksNatively: !0
   };
 }
-function cw(i, e, t) {
+function c9(r, e, t) {
   if ((e.liveSyncDurationCount || e.liveMaxLatencyDurationCount) && (e.liveSyncDuration || e.liveMaxLatencyDuration))
     throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");
   if (e.liveMaxLatencyDurationCount !== void 0 && (e.liveSyncDurationCount === void 0 || e.liveMaxLatencyDurationCount <= e.liveSyncDurationCount))
     throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');
   if (e.liveMaxLatencyDuration !== void 0 && (e.liveSyncDuration === void 0 || e.liveMaxLatencyDuration <= e.liveSyncDuration))
     throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');
-  const n = Xc(i), r = ["manifest", "level", "frag"], s = ["TimeOut", "MaxRetry", "RetryDelay", "MaxRetryTimeout"];
-  return r.forEach((a) => {
+  const n = Xc(r), i = ["manifest", "level", "frag"], s = ["TimeOut", "MaxRetry", "RetryDelay", "MaxRetryTimeout"];
+  return i.forEach((a) => {
     const o = `${a === "level" ? "playlist" : a}LoadPolicy`, l = e[o] === void 0, u = [];
     s.forEach((c) => {
       const h = `${a}Loading${c}`, d = e[h];
@@ -40006,15 +40006,15 @@ function cw(i, e, t) {
     }), u.length && t.warn(`hls.js config: "${u.join('", "')}" setting(s) are deprecated, use "${o}": ${et(e[o])}`);
   }), je(je({}, n), e);
 }
-function Xc(i) {
-  return i && typeof i == "object" ? Array.isArray(i) ? i.map(Xc) : Object.keys(i).reduce((e, t) => (e[t] = Xc(i[t]), e), {}) : i;
+function Xc(r) {
+  return r && typeof r == "object" ? Array.isArray(r) ? r.map(Xc) : Object.keys(r).reduce((e, t) => (e[t] = Xc(r[t]), e), {}) : r;
 }
-function hw(i, e) {
-  const t = i.loader;
-  t !== K1 && t !== e4 ? (e.log("[config]: Custom loader detected, cannot enable progressive streaming"), i.progressive = !1) : J9() && (i.loader = K1, i.progressive = !0, i.enableSoftwareAES = !0, e.log("[config]: Progressive streaming enabled, using FetchLoader"));
+function h9(r, e) {
+  const t = r.loader;
+  t !== K1 && t !== e4 ? (e.log("[config]: Custom loader detected, cannot enable progressive streaming"), r.progressive = !1) : Jw() && (r.loader = K1, r.progressive = !0, r.enableSoftwareAES = !0, e.log("[config]: Progressive streaming enabled, using FetchLoader"));
 }
-const ml = 2, dw = 0.1, fw = 0.05, mw = 100;
-class gw extends jv {
+const ml = 2, d9 = 0.1, f9 = 0.05, m9 = 100;
+class g9 extends jv {
   constructor(e, t) {
     super("gap-controller", e.logger), this.hls = void 0, this.fragmentTracker = void 0, this.media = null, this.mediaSource = void 0, this.nudgeRetry = 0, this.stallReported = !1, this.stalled = null, this.moved = !1, this.seeking = !1, this.buffered = {}, this.lastCurrentTime = 0, this.ended = 0, this.waiting = 0, this.onMediaPlaying = () => {
       this.ended = 0, this.waiting = 0;
@@ -40046,7 +40046,7 @@ class gw extends jv {
     super.destroy(), this.unregisterListeners(), this.media = this.hls = this.fragmentTracker = null, this.mediaSource = void 0;
   }
   onMediaAttached(e, t) {
-    this.setInterval(mw), this.mediaSource = t.mediaSource;
+    this.setInterval(m9), this.mediaSource = t.mediaSource;
     const n = this.media = t.media;
     fn(n, "playing", this.onMediaPlaying), fn(n, "waiting", this.onMediaWaiting), fn(n, "ended", this.onMediaEnded);
   }
@@ -40077,7 +40077,7 @@ class gw extends jv {
    * @param lastCurrentTime - Previously read playhead position
    */
   poll(e, t) {
-    var n, r;
+    var n, i;
     const s = (n = this.hls) == null ? void 0 : n.config;
     if (!s)
       return;
@@ -40112,7 +40112,7 @@ class gw extends jv {
         return;
       this.moved = !1;
     }
-    const m = (r = this.hls) == null ? void 0 : r.latestLevelDetails;
+    const m = (i = this.hls) == null ? void 0 : i.latestLevelDetails;
     if (!this.moved && this.stalled !== null && f) {
       if (!(h.len > 0) && !d)
         return;
@@ -40157,11 +40157,11 @@ class gw extends jv {
   }
   nudgeOnVideoHole(e, t) {
     var n;
-    const r = this.buffered.video;
-    if (this.hls && this.media && this.fragmentTracker && (n = this.buffered.audio) != null && n.length && r && r.length > 1 && e > r.end(0)) {
+    const i = this.buffered.video;
+    if (this.hls && this.media && this.fragmentTracker && (n = this.buffered.audio) != null && n.length && i && i.length > 1 && e > i.end(0)) {
       const s = De.bufferedInfo(De.timeRangesToArray(this.buffered.audio), e, 0);
       if (s.len > 1 && t >= s.start) {
-        const a = De.timeRangesToArray(r), o = De.bufferedInfo(a, t, 0).bufferedIndex;
+        const a = De.timeRangesToArray(i), o = De.bufferedInfo(a, t, 0).bufferedIndex;
         if (o > -1 && o < a.length - 1) {
           const l = De.bufferedInfo(a, e, 0).bufferedIndex, u = a[o].end, c = a[o + 1].start;
           if ((l === -1 || l > o) && c - u < 1 && // `maxBufferHole` may be too small and setting it to 0 should not disable this feature
@@ -40193,11 +40193,11 @@ class gw extends jv {
    * @private
    */
   _tryFixBufferStall(e, t, n) {
-    var r, s;
+    var i, s;
     const {
       fragmentTracker: a,
       media: o
-    } = this, l = (r = this.hls) == null ? void 0 : r.config;
+    } = this, l = (i = this.hls) == null ? void 0 : i.config;
     if (!o || !a || !l)
       return;
     const u = (s = this.hls) == null ? void 0 : s.latestLevelDetails, c = Yo(n, a);
@@ -40207,9 +40207,9 @@ class gw extends jv {
     (h && h.length > 1 && e.len > l.maxBufferHole || e.nextStart && (e.nextStart - n < l.maxBufferHole || d)) && (t > l.highBufferWatchdogPeriod * 1e3 || this.waiting) && (this.warn("Trying to nudge playhead over buffer-hole"), this._tryNudgeBuffer(e));
   }
   adjacentTraversal(e, t) {
-    const n = this.fragmentTracker, r = e.nextStart;
-    if (n && r) {
-      const s = n.getFragAtPos(t, ce.MAIN), a = n.getFragAtPos(r, ce.MAIN);
+    const n = this.fragmentTracker, i = e.nextStart;
+    if (n && i) {
+      const s = n.getFragAtPos(t, ce.MAIN), a = n.getFragAtPos(i, ce.MAIN);
       if (s && a)
         return a.sn - s.sn < 2;
     }
@@ -40224,10 +40224,10 @@ class gw extends jv {
     const {
       hls: t,
       media: n,
-      stallReported: r,
+      stallReported: i,
       stalled: s
     } = this;
-    if (!r && s !== null && n && t) {
+    if (!i && s !== null && n && t) {
       this.stallReported = !0;
       const a = new Error(`Playback stalling at @${n.currentTime} due to low buffer (${et(e)})`);
       this.warn(a.message), t.trigger(S.ERROR, {
@@ -40252,13 +40252,13 @@ class gw extends jv {
     var t;
     const {
       fragmentTracker: n,
-      media: r
+      media: i
     } = this, s = (t = this.hls) == null ? void 0 : t.config;
-    if (!r || !n || !s)
+    if (!i || !n || !s)
       return 0;
-    const a = r.currentTime, o = De.bufferInfo(r, a, 0), l = a < o.start ? o.start : o.nextStart;
+    const a = i.currentTime, o = De.bufferInfo(i, a, 0), l = a < o.start ? o.start : o.nextStart;
     if (l && this.hls) {
-      const c = o.len <= s.maxBufferHole, h = o.len > 0 && o.len < 1 && r.readyState < 3, d = l - a;
+      const c = o.len <= s.maxBufferHole, h = o.len > 0 && o.len < 1 && i.readyState < 3, d = l - a;
       if (d > 0 && (c || h)) {
         if (d > s.maxBufferHole) {
           let m = !1;
@@ -40284,8 +40284,8 @@ class gw extends jv {
               return 0;
           }
         }
-        const f = Math.max(l + fw, a + dw);
-        if (this.warn(`skipping hole, adjusting currentTime from ${a} to ${f}`), this.moved = !0, r.currentTime = f, !(e != null && e.gap)) {
+        const f = Math.max(l + f9, a + d9);
+        if (this.warn(`skipping hole, adjusting currentTime from ${a} to ${f}`), this.moved = !0, i.currentTime = f, !(e != null && e.gap)) {
           const m = new Error(`fragment loaded with buffer holes, seeking from ${a} to ${f}`), g = {
             type: fe.MEDIA_ERROR,
             details: G.BUFFER_SEEK_OVER_HOLE,
@@ -40310,13 +40310,13 @@ class gw extends jv {
     const {
       hls: t,
       media: n,
-      nudgeRetry: r
+      nudgeRetry: i
     } = this, s = t == null ? void 0 : t.config;
     if (!n || !s)
       return 0;
     const a = n.currentTime;
-    if (this.nudgeRetry++, r < s.nudgeMaxRetry) {
-      const o = a + (r + 1) * s.nudgeOffset, l = new Error(`Nudging 'currentTime' from ${a} to ${o}`);
+    if (this.nudgeRetry++, i < s.nudgeMaxRetry) {
+      const o = a + (i + 1) * s.nudgeOffset, l = new Error(`Nudging 'currentTime' from ${a} to ${o}`);
       this.warn(l.message), n.currentTime = o, t.trigger(S.ERROR, {
         type: fe.MEDIA_ERROR,
         details: G.BUFFER_NUDGE_ON_STALL,
@@ -40338,54 +40338,54 @@ class gw extends jv {
     }
   }
 }
-function j1(i, e) {
-  const t = W1(i.main);
+function j1(r, e) {
+  const t = W1(r.main);
   if (t && t.start <= e)
     return t;
-  const n = W1(i.audio);
+  const n = W1(r.audio);
   return n && n.start <= e ? n : null;
 }
-function W1(i) {
-  if (!i)
+function W1(r) {
+  if (!r)
     return null;
-  switch (i.state) {
+  switch (r.state) {
     case Q.IDLE:
     case Q.STOPPED:
     case Q.ENDED:
     case Q.ERROR:
       return null;
   }
-  return i.frag;
+  return r.frag;
 }
-function Yo(i, e) {
-  return e.getAppendedFrag(i, ce.MAIN) || e.getPartialFragment(i);
+function Yo(r, e) {
+  return e.getAppendedFrag(r, ce.MAIN) || e.getPartialFragment(r);
 }
-const pw = 0.25;
+const p9 = 0.25;
 function Qc() {
   if (!(typeof self > "u"))
     return self.VTTCue || self.TextTrackCue;
 }
-function Yu(i, e, t, n, r) {
-  let s = new i(e, t, "");
+function Yu(r, e, t, n, i) {
+  let s = new r(e, t, "");
   try {
-    s.value = n, r && (s.type = r);
+    s.value = n, i && (s.type = i);
   } catch {
-    s = new i(e, t, et(r ? je({
-      type: r
+    s = new r(e, t, et(i ? je({
+      type: i
     }, n) : n));
   }
   return s;
 }
 const Xo = (() => {
-  const i = Qc();
+  const r = Qc();
   try {
-    i && new i(0, Number.POSITIVE_INFINITY, "");
+    r && new r(0, Number.POSITIVE_INFINITY, "");
   } catch {
     return Number.MAX_VALUE;
   }
   return Number.POSITIVE_INFINITY;
 })();
-class _w {
+class _9 {
   constructor(e) {
     this.hls = void 0, this.id3Track = null, this.media = null, this.dateRangeCuesAppended = {}, this.removeCues = !0, this.assetCue = void 0, this.onEventCueEnter = () => {
       this.hls && this.hls.trigger(S.EVENT_CUE_ENTER, {});
@@ -40441,9 +40441,9 @@ class _w {
       return;
     const {
       enableEmsgMetadataCues: n,
-      enableID3MetadataCues: r
+      enableID3MetadataCues: i
     } = this.hls.config;
-    if (!n && !r)
+    if (!n && !i)
       return;
     const {
       samples: s
@@ -40453,11 +40453,11 @@ class _w {
     if (a)
       for (let o = 0; o < s.length; o++) {
         const l = s[o].type;
-        if (l === Rn.emsg && !n || !r)
+        if (l === Rn.emsg && !n || !i)
           continue;
         const u = p2(s[o].data), c = s[o].pts;
         let h = c + s[o].duration;
-        h > Xo && (h = Xo), h - c <= 0 && (h = c + pw);
+        h > Xo && (h = Xo), h - c <= 0 && (h = c + p9);
         for (let f = 0; f < u.length; f++) {
           const m = u[f];
           if (!_2(m)) {
@@ -40470,17 +40470,17 @@ class _w {
   }
   updateId3CueEnds(e, t) {
     var n;
-    const r = (n = this.id3Track) == null ? void 0 : n.cues;
-    if (r)
-      for (let s = r.length; s--; ) {
-        const a = r[s];
+    const i = (n = this.id3Track) == null ? void 0 : n.cues;
+    if (i)
+      for (let s = i.length; s--; ) {
+        const a = i[s];
         a.type === t && a.startTime < e && a.endTime === Xo && (a.endTime = e);
       }
   }
   onBufferFlushing(e, {
     startOffset: t,
     endOffset: n,
-    type: r
+    type: i
   }) {
     const {
       id3Track: s,
@@ -40496,7 +40496,7 @@ class _w {
     } = a;
     if (s && (o || l)) {
       let u;
-      r === "audio" ? u = (c) => c.type === Rn.audioId3 && l : r === "video" ? u = (c) => c.type === Rn.emsg && o : u = (c) => c.type === Rn.audioId3 && l || c.type === Rn.emsg && o, Wc(s, t, n, u);
+      i === "audio" ? u = (c) => c.type === Rn.audioId3 && l : i === "video" ? u = (c) => c.type === Rn.emsg && o : u = (c) => c.type === Rn.audioId3 && l || c.type === Rn.emsg && o, Wc(s, t, n, u);
     }
   }
   onLevelUpdated(e, {
@@ -40512,14 +40512,14 @@ class _w {
       return;
     const {
       assetPlayerId: n,
-      timelineOffset: r,
+      timelineOffset: i,
       enableDateRangeMetadataCues: s,
       interstitialsController: a
     } = this.hls.config;
     if (!s)
       return;
     const o = Qc();
-    if (n && r && !a) {
+    if (n && i && !a) {
       const {
         fragmentStart: g,
         fragmentEnd: p
@@ -40608,7 +40608,7 @@ class _w {
     }
   }
 }
-class vw {
+class v9 {
   constructor(e) {
     this.hls = void 0, this.config = void 0, this.media = null, this.currentTime = 0, this.stallCount = 0, this._latency = null, this._targetLatencyUpdated = !1, this.onTimeupdate = () => {
       const {
@@ -40617,10 +40617,10 @@ class vw {
       if (!t || !n)
         return;
       this.currentTime = t.currentTime;
-      const r = this.computeLatency();
-      if (r === null)
+      const i = this.computeLatency();
+      if (i === null)
         return;
-      this._latency = r;
+      this._latency = i;
       const {
         lowLatencyMode: s,
         maxLiveSyncPlaybackRate: a
@@ -40630,7 +40630,7 @@ class vw {
       const o = this.targetLatency;
       if (o === null)
         return;
-      const l = r - o, u = Math.min(this.maxLatency, o + n.targetduration);
+      const l = i - o, u = Math.min(this.maxLatency, o + n.targetduration);
       if (l < u && l > 0.05 && this.forwardBufferLength > 1) {
         const h = Math.min(2, Math.max(1, a)), d = Math.round(2 / (1 + Math.exp(-0.75 * l - this.edgeStalled)) * 20) / 20, f = Math.min(h, Math.max(1, d));
         this.changeMediaPlaybackRate(t, f);
@@ -40660,15 +40660,15 @@ class vw {
     const {
       holdBack: t,
       partHoldBack: n,
-      targetduration: r
+      targetduration: i
     } = e, {
       liveSyncDuration: s,
       liveSyncDurationCount: a,
       lowLatencyMode: o
     } = this.config, l = this.hls.userConfig;
     let u = o && n || t;
-    (this._targetLatencyUpdated || l.liveSyncDuration || l.liveSyncDurationCount || u === 0) && (u = s !== void 0 ? s : a * r);
-    const c = r;
+    (this._targetLatencyUpdated || l.liveSyncDuration || l.liveSyncDurationCount || u === 0) && (u = s !== void 0 ? s : a * i);
+    const c = i;
     return u + Math.min(this.stallCount * this.config.liveSyncOnStallIncrease, c);
   }
   set targetLatency(e) {
@@ -40681,7 +40681,7 @@ class vw {
     const n = this.levelDetails;
     if (n === null)
       return null;
-    const r = n.edge, s = e - t - this.edgeStalled, a = r - n.totalduration, o = r - (this.config.lowLatencyMode && n.partTarget || n.targetduration);
+    const i = n.edge, s = e - t - this.edgeStalled, a = i - n.totalduration, o = i - (this.config.lowLatencyMode && n.partTarget || n.targetduration);
     return Math.min(Math.max(a, s), o);
   }
   get drift() {
@@ -40738,8 +40738,8 @@ class vw {
     t.details === G.BUFFER_STALLED_ERROR && (this.stallCount++, this.hls && (n = this.levelDetails) != null && n.live && this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"));
   }
   changeMediaPlaybackRate(e, t) {
-    var n, r;
-    e.playbackRate !== t && ((n = this.hls) == null || n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r = this.targetLatency) == null ? void 0 : r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`), e.playbackRate = t);
+    var n, i;
+    e.playbackRate !== t && ((n = this.hls) == null || n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(i = this.targetLatency) == null ? void 0 : i.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`), e.playbackRate = t);
   }
   estimateLiveEdge() {
     const e = this.levelDetails;
@@ -40750,7 +40750,7 @@ class vw {
     return e === null ? null : e - this.currentTime;
   }
 }
-class yw extends ld {
+class y9 extends ld {
   constructor(e, t) {
     super(e, "level-controller"), this._levels = [], this._firstLevel = -1, this._maxAutoLevel = -1, this._startLevel = void 0, this.currentLevel = null, this.currentLevelIndex = -1, this.manualLevelIndex = -1, this.steering = void 0, this.onParsedComplete = void 0, this.steering = t, this._registerListeners();
   }
@@ -40781,7 +40781,7 @@ class yw extends ld {
     this.resetLevels();
   }
   onManifestLoaded(e, t) {
-    const n = this.hls.config.preferManagedMediaSource, r = [], s = {}, a = {};
+    const n = this.hls.config.preferManagedMediaSource, i = [], s = {}, a = {};
     let o = !1, l = !1, u = !1;
     t.levels.forEach((c) => {
       const h = c.attrs;
@@ -40812,20 +40812,20 @@ class yw extends ld {
           const R = a[I] += 1;
           c.attrs["PATHWAY-ID"] = new Array(R + 1).join(".");
           const M = this.createLevel(c);
-          s[I] = M, r.push(M);
+          s[I] = M, i.push(M);
         } else
           s[I].addGroupId("audio", h.AUDIO), s[I].addGroupId("text", h.SUBTITLES);
       else {
         const R = this.createLevel(c);
-        s[I] = R, a[I] = 1, r.push(R);
+        s[I] = R, a[I] = 1, i.push(R);
       }
-    }), this.filterAndSortMediaOptions(r, t, o, l, u);
+    }), this.filterAndSortMediaOptions(i, t, o, l, u);
   }
   createLevel(e) {
     const t = new Ka(e), n = e.supplemental;
     if (n != null && n.videoCodec && !this.isVideoSupported(n.videoCodec)) {
-      const r = new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);
-      this.log(r.message), t.supportedResult = $v(r, []);
+      const i = new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);
+      this.log(i.message), t.supportedResult = $v(i, []);
     }
     return t;
   }
@@ -40835,11 +40835,11 @@ class yw extends ld {
   isVideoSupported(e) {
     return qa(e, "video", this.hls.config.preferManagedMediaSource);
   }
-  filterAndSortMediaOptions(e, t, n, r, s) {
+  filterAndSortMediaOptions(e, t, n, i, s) {
     var a;
     let o = [], l = [], u = e;
     const c = ((a = t.stats) == null ? void 0 : a.parsing) || {};
-    if ((n || r) && s && (u = u.filter(({
+    if ((n || i) && s && (u = u.filter(({
       videoCodec: y,
       videoRange: v,
       width: T,
@@ -40905,7 +40905,7 @@ class yw extends ld {
         }
         break;
       }
-    const m = s && !r, g = this.hls.config, p = !!(g.audioStreamController && g.audioTrackController), b = {
+    const m = s && !i, g = this.hls.config, p = !!(g.audioStreamController && g.audioTrackController), b = {
       levels: u,
       audioTracks: o,
       subtitleTracks: l,
@@ -40914,7 +40914,7 @@ class yw extends ld {
       firstLevel: this._firstLevel,
       stats: t.stats,
       audio: s,
-      video: r,
+      video: i,
       altAudio: p && !m && o.some((y) => !!y.url)
     };
     c.end = performance.now(), this.hls.trigger(S.MANIFEST_PARSED, b);
@@ -40945,8 +40945,8 @@ class yw extends ld {
         return;
       e = Math.min(e, t.length - 1);
     }
-    const n = this.currentLevelIndex, r = this.currentLevel, s = r ? r.attrs["PATHWAY-ID"] : void 0, a = t[e], o = a.attrs["PATHWAY-ID"];
-    if (this.currentLevelIndex = e, this.currentLevel = a, n === e && r && s === o)
+    const n = this.currentLevelIndex, i = this.currentLevel, s = i ? i.attrs["PATHWAY-ID"] : void 0, a = t[e], o = a.attrs["PATHWAY-ID"];
+    if (this.currentLevelIndex = e, this.currentLevel = a, n === e && i && s === o)
       return;
     this.log(`Switching to level ${e} (${a.height ? a.height + "p " : ""}${a.videoRange ? a.videoRange + " " : ""}${a.codecSet ? a.codecSet + " " : ""}@${a.bitrate})${o ? " with Pathway " + o : ""} from level ${n}${s ? " with Pathway " + s : ""}`);
     const l = {
@@ -40978,7 +40978,7 @@ class yw extends ld {
     this.hls.trigger(S.LEVEL_SWITCHING, l);
     const u = a.details;
     if (!u || u.live) {
-      const c = this.switchParams(a.uri, r == null ? void 0 : r.details, u);
+      const c = this.switchParams(a.uri, i == null ? void 0 : i.details, u);
       this.loadPlaylist(c);
     }
   }
@@ -41012,7 +41012,7 @@ class yw extends ld {
   }
   set pathwayPriority(e) {
     if (this.steering) {
-      const t = this.steering.pathways(), n = e.filter((r) => t.indexOf(r) !== -1);
+      const t = this.steering.pathways(), n = e.filter((i) => t.indexOf(i) !== -1);
       if (e.length < 1) {
         this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);
         return;
@@ -41031,25 +41031,25 @@ class yw extends ld {
       const n = t.elementaryStreams;
       if (!Object.keys(n).some((s) => !!n[s]))
         return;
-      const r = this._levels[t.level];
-      r != null && r.loadError && (this.log(`Resetting level error count of ${r.loadError} on frag buffered`), r.loadError = 0);
+      const i = this._levels[t.level];
+      i != null && i.loadError && (this.log(`Resetting level error count of ${i.loadError} on frag buffered`), i.loadError = 0);
     }
   }
   onLevelLoaded(e, t) {
     var n;
     const {
-      level: r,
+      level: i,
       details: s
     } = t, a = t.levelInfo;
     if (!a) {
       var o;
-      this.warn(`Invalid level index ${r}`), (o = t.deliveryDirectives) != null && o.skip && (s.deltaUpdateFailed = !0);
+      this.warn(`Invalid level index ${i}`), (o = t.deliveryDirectives) != null && o.skip && (s.deltaUpdateFailed = !0);
       return;
     }
     if (a === this.currentLevel || t.withoutMultiVariant) {
       a.fragmentError === 0 && (a.loadError = 0);
       let l = a.details;
-      l === t.details && l.advanced && (l = void 0), this.playlistLoaded(r, t, l);
+      l === t.details && l.advanced && (l = void 0), this.playlistLoaded(i, t, l);
     } else (n = t.deliveryDirectives) != null && n.skip && (s.deltaUpdateFailed = !0);
   }
   loadPlaylist(e) {
@@ -41057,10 +41057,10 @@ class yw extends ld {
   }
   loadingPlaylist(e, t) {
     super.loadingPlaylist(e, t);
-    const n = this.getUrlWithDirectives(e.uri, t), r = this.currentLevelIndex, s = e.attrs["PATHWAY-ID"], a = e.details, o = a == null ? void 0 : a.age;
-    this.log(`Loading level index ${r}${(t == null ? void 0 : t.msn) !== void 0 ? " at sn " + t.msn + " part " + t.part : ""}${s ? " Pathway " + s : ""}${o && a.live ? " age " + o.toFixed(1) + (a.type && " " + a.type || "") : ""} ${n}`), this.hls.trigger(S.LEVEL_LOADING, {
+    const n = this.getUrlWithDirectives(e.uri, t), i = this.currentLevelIndex, s = e.attrs["PATHWAY-ID"], a = e.details, o = a == null ? void 0 : a.age;
+    this.log(`Loading level index ${i}${(t == null ? void 0 : t.msn) !== void 0 ? " at sn " + t.msn + " part " + t.part : ""}${s ? " Pathway " + s : ""}${o && a.live ? " age " + o.toFixed(1) + (a.type && " " + a.type || "") : ""} ${n}`), this.hls.trigger(S.LEVEL_LOADING, {
       url: n,
-      level: r,
+      level: i,
       levelInfo: e,
       pathwayId: e.attrs["PATHWAY-ID"],
       id: 0,
@@ -41080,8 +41080,8 @@ class yw extends ld {
       return;
     const n = this._levels.filter((s, a) => a !== e ? !0 : (this.steering && this.steering.removeLevel(s), s === this.currentLevel && (this.currentLevel = null, this.currentLevelIndex = -1, s.details && s.details.fragments.forEach((o) => o.level = -1)), !1));
     a2(n), this._levels = n, this.currentLevelIndex > -1 && (t = this.currentLevel) != null && t.details && (this.currentLevelIndex = this.currentLevel.details.fragments[0].level), this.manualLevelIndex > -1 && (this.manualLevelIndex = this.currentLevelIndex);
-    const r = n.length - 1;
-    this._firstLevel = Math.min(this._firstLevel, r), this._startLevel && (this._startLevel = Math.min(this._startLevel, r)), this.hls.trigger(S.LEVELS_UPDATED, {
+    const i = n.length - 1;
+    this._firstLevel = Math.min(this._firstLevel, i), this._startLevel && (this._startLevel = Math.min(this._startLevel, i)), this.hls.trigger(S.LEVELS_UPDATED, {
       levels: n
     });
   }
@@ -41105,9 +41105,9 @@ class yw extends ld {
     }));
   }
 }
-function Y1(i) {
+function Y1(r) {
   const e = {};
-  i.forEach((t) => {
+  r.forEach((t) => {
     const n = t.groupId || "";
     t.id = e[n] = e[n] || 0, e[n]++;
   });
@@ -41116,32 +41116,32 @@ function t4() {
   return self.SourceBuffer || self.WebKitSourceBuffer;
 }
 function n4() {
-  if (!kr())
+  if (!ki())
     return !1;
   const e = t4();
   return !e || e.prototype && typeof e.prototype.appendBuffer == "function" && typeof e.prototype.remove == "function";
 }
-function bw() {
+function b9() {
   if (!n4())
     return !1;
-  const i = kr();
-  return typeof (i == null ? void 0 : i.isTypeSupported) == "function" && (["avc1.42E01E,mp4a.40.2", "av01.0.01M.08", "vp09.00.50.08"].some((e) => i.isTypeSupported(Va(e, "video"))) || ["mp4a.40.2", "fLaC"].some((e) => i.isTypeSupported(Va(e, "audio"))));
+  const r = ki();
+  return typeof (r == null ? void 0 : r.isTypeSupported) == "function" && (["avc1.42E01E,mp4a.40.2", "av01.0.01M.08", "vp09.00.50.08"].some((e) => r.isTypeSupported(Va(e, "video"))) || ["mp4a.40.2", "fLaC"].some((e) => r.isTypeSupported(Va(e, "audio"))));
 }
-function Ew() {
-  var i;
+function E9() {
+  var r;
   const e = t4();
-  return typeof (e == null || (i = e.prototype) == null ? void 0 : i.changeType) == "function";
+  return typeof (e == null || (r = e.prototype) == null ? void 0 : r.changeType) == "function";
 }
-const Sw = 100;
-class Tw extends ed {
+const S9 = 100;
+class T9 extends ed {
   constructor(e, t, n) {
     super(e, t, n, "stream-controller", ce.MAIN), this.audioCodecSwap = !1, this.level = -1, this._forceStartLoad = !1, this._hasEnoughToStart = !1, this.altAudio = 0, this.audioOnly = !1, this.fragPlaying = null, this.fragLastKbps = 0, this.couldBacktrack = !1, this.backtrackFragment = null, this.audioCodecSwitch = !1, this.videoBuffer = null, this.onMediaPlaying = () => {
       this.tick();
     }, this.onMediaSeeked = () => {
-      const r = this.media, s = r ? r.currentTime : null;
+      const i = this.media, s = i ? i.currentTime : null;
       if (s === null || !oe(s) || (this.log(`Media seeked to ${s.toFixed(3)}`), !this.getBufferedFrag(s)))
         return;
-      const a = this.getFwdBufferInfoAtPos(r, s, ce.MAIN, 0);
+      const a = this.getFwdBufferInfoAtPos(i, s, ce.MAIN, 0);
       if (a === null || a.len === 0) {
         this.warn(`Main forward buffer length at ${s} on "seeked" event ${a ? a.len : "empty"})`);
         return;
@@ -41170,11 +41170,11 @@ class Tw extends ed {
     if (this.levels) {
       const {
         lastCurrentTime: n,
-        hls: r
+        hls: i
       } = this;
-      if (this.stopLoad(), this.setInterval(Sw), this.level = -1, !this.startFragRequested) {
-        let s = r.startLevel;
-        s === -1 && (r.config.testBandwidth && this.levels.length > 1 ? (s = 0, this.bitrateTest = !0) : s = r.firstAutoLevel), r.nextLoadLevel = s, this.level = r.loadLevel, this._hasEnoughToStart = !!t;
+      if (this.stopLoad(), this.setInterval(S9), this.level = -1, !this.startFragRequested) {
+        let s = i.startLevel;
+        s === -1 && (i.config.testBandwidth && this.levels.length > 1 ? (s = 0, this.bitrateTest = !0) : s = i.firstAutoLevel), i.nextLoadLevel = s, this.level = i.loadLevel, this._hasEnoughToStart = !!t;
       }
       n > 0 && e === -1 && !t && (this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`), e = n), this.state = Q.IDLE, this.nextLoadPosition = this.lastCurrentTime = e + this.timelineOffset, this.startPosition = t ? -1 : e, this.tick();
     } else
@@ -41189,9 +41189,9 @@ class Tw extends ed {
         const {
           levels: e,
           level: t
-        } = this, n = e == null ? void 0 : e[t], r = n == null ? void 0 : n.details;
-        if (r && (!r.live || this.levelLastLoaded === n && !this.waitForLive(n))) {
-          if (this.waitForCdnTuneIn(r))
+        } = this, n = e == null ? void 0 : e[t], i = n == null ? void 0 : n.details;
+        if (i && (!i.live || this.levelLastLoaded === n && !this.waitForLive(n))) {
+          if (this.waitForCdnTuneIn(i))
             break;
           this.state = Q.IDLE;
           break;
@@ -41216,9 +41216,9 @@ class Tw extends ed {
       hls: e,
       levelLastLoaded: t,
       levels: n,
-      media: r
+      media: i
     } = this;
-    if (t === null || !r && !this.primaryPrefetch && (this.startFragRequested || !e.config.startFragPrefetch) || this.altAudio && this.audioOnly)
+    if (t === null || !i && !this.primaryPrefetch && (this.startFragRequested || !e.config.startFragPrefetch) || this.altAudio && this.audioOnly)
       return;
     const s = this.buffering ? e.nextLoadLevel : e.loadLevel;
     if (!(n != null && n[s]))
@@ -41261,8 +41261,8 @@ class Tw extends ed {
     f && (f.initSegment && !f.initSegment.data && !this.bitrateTest && (f = f.initSegment), this.loadFragment(f, a, d));
   }
   loadFragment(e, t, n) {
-    const r = this.fragmentTracker.getState(e);
-    r === Ot.NOT_LOADED || r === Ot.PARTIAL ? Tt(e) ? this.bitrateTest ? (this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`), this._loadBitrateTestFrag(e, t)) : super.loadFragment(e, t, n) : this._loadInitSegment(e, t) : this.clearTrackerIfNeeded(e);
+    const i = this.fragmentTracker.getState(e);
+    i === Ot.NOT_LOADED || i === Ot.PARTIAL ? Tt(e) ? this.bitrateTest ? (this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`), this._loadBitrateTestFrag(e, t)) : super.loadFragment(e, t, n) : this._loadInitSegment(e, t) : this.clearTrackerIfNeeded(e);
   }
   getBufferedFrag(e) {
     return this.fragmentTracker.getBufferedFrag(e, ce.MAIN);
@@ -41292,8 +41292,8 @@ class Tw extends ed {
     } = this;
     if (t != null && t.readyState) {
       let n;
-      const r = this.getAppendedFrag(t.currentTime);
-      r && r.start > 1 && this.flushMainBuffer(0, r.start - 1);
+      const i = this.getAppendedFrag(t.currentTime);
+      i && i.start > 1 && this.flushMainBuffer(0, i.start - 1);
       const s = this.getLevelDetails();
       if (s != null && s.live) {
         const o = this.getMainFwdBufferInfo();
@@ -41347,12 +41347,12 @@ class Tw extends ed {
     super.onManifestLoading(), this.log("Trigger BUFFER_RESET"), this.hls.trigger(S.BUFFER_RESET, void 0), this.couldBacktrack = !1, this.fragLastKbps = 0, this.fragPlaying = this.backtrackFragment = null, this.altAudio = 0, this.audioOnly = !1;
   }
   onManifestParsed(e, t) {
-    let n = !1, r = !1;
+    let n = !1, i = !1;
     for (let s = 0; s < t.levels.length; s++) {
       const a = t.levels[s].audioCodec;
-      a && (n = n || a.indexOf("mp4a.40.2") !== -1, r = r || a.indexOf("mp4a.40.5") !== -1);
+      a && (n = n || a.indexOf("mp4a.40.2") !== -1, i = i || a.indexOf("mp4a.40.5") !== -1);
     }
-    this.audioCodecSwitch = n && r && !Ew(), this.audioCodecSwitch && this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = t.levels, this.startFragRequested = !1;
+    this.audioCodecSwitch = n && i && !E9(), this.audioCodecSwitch && this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = t.levels, this.startFragRequested = !1;
   }
   onLevelLoading(e, t) {
     const {
@@ -41360,16 +41360,16 @@ class Tw extends ed {
     } = this;
     if (!n || this.state !== Q.IDLE)
       return;
-    const r = t.levelInfo;
-    (!r.details || r.details.live && (this.levelLastLoaded !== r || r.details.expired) || this.waitForCdnTuneIn(r.details)) && (this.state = Q.WAITING_LEVEL);
+    const i = t.levelInfo;
+    (!i.details || i.details.live && (this.levelLastLoaded !== i || i.details.expired) || this.waitForCdnTuneIn(i.details)) && (this.state = Q.WAITING_LEVEL);
   }
   onLevelLoaded(e, t) {
     var n;
     const {
-      levels: r,
+      levels: i,
       startFragRequested: s
     } = this, a = t.level, o = t.details, l = o.totalduration;
-    if (!r) {
+    if (!i) {
       this.warn(`Levels were reset while loading level ${a}`);
       return;
     }
@@ -41400,19 +41400,19 @@ class Tw extends ed {
     } = this;
     if (!n)
       return;
-    const r = this.hls.liveSyncPosition, s = this.getLoadPosition(), a = e.fragmentStart, o = e.edge, l = s >= a - t.maxFragLookUpTolerance && s <= o;
-    if (r !== null && n.duration > r && (s < r || !l)) {
+    const i = this.hls.liveSyncPosition, s = this.getLoadPosition(), a = e.fragmentStart, o = e.edge, l = s >= a - t.maxFragLookUpTolerance && s <= o;
+    if (i !== null && n.duration > i && (s < i || !l)) {
       const c = t.liveMaxLatencyDuration !== void 0 ? t.liveMaxLatencyDuration : t.liveMaxLatencyDurationCount * e.targetduration;
-      if ((!l && n.readyState < 4 || s < o - c) && (this._hasEnoughToStart || (this.nextLoadPosition = r), n.readyState))
-        if (this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${r.toFixed(3)}`), this.config.liveSyncMode === "buffered") {
+      if ((!l && n.readyState < 4 || s < o - c) && (this._hasEnoughToStart || (this.nextLoadPosition = i), n.readyState))
+        if (this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${i.toFixed(3)}`), this.config.liveSyncMode === "buffered") {
           var u;
-          const h = De.bufferInfo(n, r, 0);
+          const h = De.bufferInfo(n, i, 0);
           if (!((u = h.buffered) != null && u.length)) {
-            n.currentTime = r;
+            n.currentTime = i;
             return;
           }
           if (h.start <= s) {
-            n.currentTime = r;
+            n.currentTime = i;
             return;
           }
           const {
@@ -41420,13 +41420,13 @@ class Tw extends ed {
           } = De.bufferedInfo(h.buffered, s, 0);
           f && (n.currentTime = f);
         } else
-          n.currentTime = r;
+          n.currentTime = i;
     }
   }
   _handleFragmentLoadProgress(e) {
     var t;
     const n = e.frag, {
-      part: r,
+      part: i,
       payload: s
     } = e, {
       levels: a
@@ -41445,11 +41445,11 @@ class Tw extends ed {
       this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`), this.fragmentTracker.removeFragment(n);
       return;
     }
-    const u = o.videoCodec, c = l.PTSKnown || !l.live, h = (t = n.initSegment) == null ? void 0 : t.data, d = this._getAudioCodec(o), f = this.transmuxer = this.transmuxer || new k2(this.hls, ce.MAIN, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)), m = r ? r.index : -1, g = m !== -1, p = new Qh(n.level, n.sn, n.stats.chunkCount, s.byteLength, m, g), b = this.initPTS[n.cc];
-    f.push(s, h, d, u, n, r, l.totalduration, c, p, b);
+    const u = o.videoCodec, c = l.PTSKnown || !l.live, h = (t = n.initSegment) == null ? void 0 : t.data, d = this._getAudioCodec(o), f = this.transmuxer = this.transmuxer || new k2(this.hls, ce.MAIN, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)), m = i ? i.index : -1, g = m !== -1, p = new Qh(n.level, n.sn, n.stats.chunkCount, s.byteLength, m, g), b = this.initPTS[n.cc];
+    f.push(s, h, d, u, n, i, l.totalduration, c, p, b);
   }
   onAudioTrackSwitching(e, t) {
-    const n = this.hls, r = this.altAudio !== 0;
+    const n = this.hls, i = this.altAudio !== 0;
     if (Hl(t.url, n))
       this.altAudio = 1;
     else {
@@ -41458,7 +41458,7 @@ class Tw extends ed {
         const a = this.fragCurrent;
         a && (this.log("Switching to main audio track, cancel main fragment load"), a.abortRequests(), this.fragmentTracker.removeFragment(a)), this.resetTransmuxer(), this.resetLoadingState();
       } else this.audioOnly && this.resetTransmuxer();
-      if (r) {
+      if (i) {
         this.altAudio = 0, this.fragmentTracker.removeAllFragments(), n.once(S.BUFFER_FLUSHED, () => {
           this.hls && this.hls.trigger(S.AUDIO_TRACK_SWITCHED, t);
         }), n.trigger(S.BUFFER_FLUSHING, {
@@ -41474,38 +41474,38 @@ class Tw extends ed {
   onAudioTrackSwitched(e, t) {
     const n = Hl(t.url, this.hls);
     if (n) {
-      const r = this.videoBuffer;
-      r && this.mediaBuffer !== r && (this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"), this.mediaBuffer = r);
+      const i = this.videoBuffer;
+      i && this.mediaBuffer !== i && (this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"), this.mediaBuffer = i);
     }
     this.altAudio = n ? 2 : 0, this.tick();
   }
   onBufferCreated(e, t) {
     const n = t.tracks;
-    let r, s, a = !1;
+    let i, s, a = !1;
     for (const o in n) {
       const l = n[o];
       if (l.id === "main") {
-        if (s = o, r = l, o === "video") {
+        if (s = o, i = l, o === "video") {
           const u = n[o];
           u && (this.videoBuffer = u.buffer);
         }
       } else
         a = !0;
     }
-    a && r ? (this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`), this.mediaBuffer = r.buffer) : this.mediaBuffer = this.media;
+    a && i ? (this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`), this.mediaBuffer = i.buffer) : this.mediaBuffer = this.media;
   }
   onFragBuffered(e, t) {
     const {
       frag: n,
-      part: r
+      part: i
     } = t, s = n.type === ce.MAIN;
     if (s) {
       if (this.fragContextChanged(n)) {
-        this.warn(`Fragment ${n.sn}${r ? " p: " + r.index : ""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`), this.state === Q.PARSED && (this.state = Q.IDLE);
+        this.warn(`Fragment ${n.sn}${i ? " p: " + i.index : ""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`), this.state === Q.PARSED && (this.state = Q.IDLE);
         return;
       }
-      const o = r ? r.stats : n.stats;
-      this.fragLastKbps = Math.round(8 * o.total / (o.buffering.end - o.loading.first)), Tt(n) && (this.fragPrevious = n), this.fragBufferedComplete(n, r);
+      const o = i ? i.stats : n.stats;
+      this.fragLastKbps = Math.round(8 * o.total / (o.buffering.end - o.loading.first)), Tt(n) && (this.fragPrevious = n), this.fragBufferedComplete(n, i);
     }
     const a = this.media;
     a && (!this._hasEnoughToStart && De.getBuffered(a).length && (this._hasEnoughToStart = !0, this.seekToStartPos()), s && this.tick());
@@ -41583,8 +41583,8 @@ class Tw extends ed {
         this.log(`could not seek to ${n}, already seeking at ${t}`);
         return;
       }
-      const r = this.timelineOffset;
-      r && n && (n += r);
+      const i = this.timelineOffset;
+      i && n && (n += i);
       const s = this.getLevelDetails(), a = De.getBuffered(e), o = a.length ? a.start(0) : 0, l = o - n, u = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance);
       (this.config.startOnSegmentBoundary || l > 0 && (l < u || this.loadingParts && l < 2 * ((s == null ? void 0 : s.partTarget) || 0))) && (this.log(`adjusting start position by ${l} to match buffer start`), n += l, this.startPosition = n), t < n && (this.log(`seek to target start position ${n} from current time ${t} buffer start ${o}`), e.currentTime = n);
     }
@@ -41596,13 +41596,13 @@ class Tw extends ed {
   _loadBitrateTestFrag(e, t) {
     e.bitrateTest = !0, this._doFragLoad(e, t).then((n) => {
       const {
-        hls: r
+        hls: i
       } = this, s = n == null ? void 0 : n.frag;
       if (!s || this.fragContextChanged(s))
         return;
       t.fragmentError = 0, this.state = Q.IDLE, this.startFragRequested = !1, this.bitrateTest = !1;
       const a = s.stats;
-      a.parsing.start = a.parsing.end = a.buffering.start = a.buffering.end = self.performance.now(), r.trigger(S.FRAG_LOADED, n), s.bitrateTest = !1;
+      a.parsing.start = a.parsing.end = a.buffering.start = a.buffering.end = self.performance.now(), i.trigger(S.FRAG_LOADED, n), s.bitrateTest = !1;
     }).catch((n) => {
       this.state === Q.STOPPED || this.state === Q.ERROR || (this.warn(n), this.resetFragmentLoading(e));
     });
@@ -41611,7 +41611,7 @@ class Tw extends ed {
     const t = this.playlistType, {
       hls: n
     } = this, {
-      remuxResult: r,
+      remuxResult: i,
       chunkMeta: s
     } = e, a = this.getCurrentContext(s);
     if (!a) {
@@ -41627,9 +41627,9 @@ class Tw extends ed {
       text: h,
       id3: d,
       initSegment: f
-    } = r, {
+    } = i, {
       details: m
-    } = u, g = this.altAudio ? void 0 : r.audio;
+    } = u, g = this.altAudio ? void 0 : i.audio;
     if (this.fragContextChanged(o)) {
       this.fragmentTracker.removeFragment(o);
       return;
@@ -41665,7 +41665,7 @@ class Tw extends ed {
     if (c && m) {
       g && c.type === "audiovideo" && this.logMuxedErr(o);
       const p = m.fragments[o.sn - 1 - m.startSN], b = o.sn === m.startSN, y = !p || o.cc > p.cc;
-      if (r.independent !== !1) {
+      if (i.independent !== !1) {
         const {
           startPTS: v,
           endPTS: T,
@@ -41731,7 +41731,7 @@ class Tw extends ed {
   logMuxedErr(e) {
     this.warn(`${Tt(e) ? "Media" : "Init"} segment with muxed audiovideo where only video expected: ${e.url}`);
   }
-  _bufferInitSegment(e, t, n, r) {
+  _bufferInitSegment(e, t, n, i) {
     if (this.state !== Q.PARSING)
       return;
     this.audioOnly = !!t.audio && !t.video, this.altAudio && !this.audioOnly && (delete t.audio, t.audiovideo && this.logMuxedErr(n));
@@ -41782,7 +41782,7 @@ class Tw extends ed {
           data: h,
           frag: n,
           part: null,
-          chunkMeta: r,
+          chunkMeta: i,
           parent: n.type
         });
       });
@@ -41810,10 +41810,10 @@ class Tw extends ed {
       const n = e.currentTime;
       if (De.isBuffered(e, n) ? t = this.getAppendedFrag(n) : De.isBuffered(e, n + 0.1) && (t = this.getAppendedFrag(n + 0.1)), t) {
         this.backtrackFragment = null;
-        const r = this.fragPlaying, s = t.level;
-        (!r || t.sn !== r.sn || r.level !== s) && (this.fragPlaying = t, this.hls.trigger(S.FRAG_CHANGED, {
+        const i = this.fragPlaying, s = t.level;
+        (!i || t.sn !== i.sn || i.level !== s) && (this.fragPlaying = t, this.hls.trigger(S.FRAG_CHANGED, {
           frag: t
-        }), (!r || r.level !== s) && this.hls.trigger(S.LEVEL_SWITCHED, {
+        }), (!i || i.level !== s) && this.hls.trigger(S.LEVEL_SWITCHED, {
           level: s
         }));
       }
@@ -41834,11 +41834,11 @@ class Tw extends ed {
     var e;
     const t = ((e = this.media) == null ? void 0 : e.currentTime) || this.lastCurrentTime;
     if (oe(t)) {
-      const n = this.getLevelDetails(), r = this.currentFrag || (n ? os(null, n.fragments, t) : null);
-      if (r) {
-        const s = r.programDateTime;
+      const n = this.getLevelDetails(), i = this.currentFrag || (n ? os(null, n.fragments, t) : null);
+      if (i) {
+        const s = i.programDateTime;
         if (s !== null) {
-          const a = s + (t - r.start) * 1e3;
+          const a = s + (t - i.start) * 1e3;
           return new Date(a);
         }
       }
@@ -41857,18 +41857,18 @@ class Tw extends ed {
     return this._forceStartLoad;
   }
 }
-class Aw extends ni {
+class A9 extends nr {
   constructor(e, t) {
     super("key-loader", t), this.config = void 0, this.keyIdToKeyInfo = {}, this.emeController = null, this.config = e;
   }
   abort(e) {
     for (const n in this.keyIdToKeyInfo) {
-      const r = this.keyIdToKeyInfo[n].loader;
-      if (r) {
+      const i = this.keyIdToKeyInfo[n].loader;
+      if (i) {
         var t;
-        if (e && e !== ((t = r.context) == null ? void 0 : t.frag.type))
+        if (e && e !== ((t = i.context) == null ? void 0 : t.frag.type))
           return;
-        r.abort();
+        i.abort();
       }
     }
   }
@@ -41886,23 +41886,23 @@ class Aw extends ni {
     }
     this.keyIdToKeyInfo = {};
   }
-  createKeyLoadError(e, t = G.KEY_LOAD_ERROR, n, r, s) {
-    return new Ji({
+  createKeyLoadError(e, t = G.KEY_LOAD_ERROR, n, i, s) {
+    return new Jr({
       type: fe.NETWORK_ERROR,
       details: t,
       fatal: !1,
       frag: e,
       response: s,
       error: n,
-      networkDetails: r
+      networkDetails: i
     });
   }
   loadClear(e, t, n) {
     if (this.emeController && this.config.emeEnabled && !this.emeController.getSelectedKeySystemFormats().length) {
       if (t.length)
-        for (let r = 0, s = t.length; r < s; r++) {
-          const a = t[r];
-          if (e.cc <= a.cc && (!Tt(e) || !Tt(a) || e.sn < a.sn) || !n && r == s - 1)
+        for (let i = 0, s = t.length; i < s; i++) {
+          const a = t[i];
+          if (e.cc <= a.cc && (!Tt(e) || !Tt(a) || e.sn < a.sn) || !n && i == s - 1)
             return this.emeController.selectKeySystemFormat(a).then((o) => {
               if (!this.emeController)
                 return;
@@ -41913,9 +41913,9 @@ class Aw extends ni {
             });
         }
       if (this.config.requireKeySystemAccessOnStart) {
-        const r = Aa(this.config);
-        if (r.length)
-          return this.emeController.getKeySystemAccess(r);
+        const i = Aa(this.config);
+        if (i.length)
+          return this.emeController.getKeySystemAccess(i);
       }
     }
     return null;
@@ -41924,7 +41924,7 @@ class Aw extends ni {
     return !e.decryptdata && e.encrypted && this.emeController && this.config.emeEnabled ? this.emeController.selectKeySystemFormat(e).then((t) => this.loadInternal(e, t)) : this.loadInternal(e);
   }
   loadInternal(e, t) {
-    var n, r;
+    var n, i;
     t && e.setKeyFormat(t);
     const s = e.decryptdata;
     if (!s) {
@@ -41941,7 +41941,7 @@ class Aw extends ni {
         frag: e,
         keyInfo: l
       });
-    if (this.emeController && (r = l) != null && r.keyLoadPromise)
+    if (this.emeController && (i = l) != null && i.keyLoadPromise)
       switch (this.emeController.getKeyStatus(l.decryptdata)) {
         case "usable":
         case "usable-in-future":
@@ -41979,12 +41979,12 @@ class Aw extends ni {
       keyInfo: e
     };
     if (this.emeController && this.config.emeEnabled) {
-      var r;
-      if (!e.decryptdata.keyId && (r = t.initSegment) != null && r.data) {
+      var i;
+      if (!e.decryptdata.keyId && (i = t.initSegment) != null && i.data) {
         const a = zS(t.initSegment.data);
         if (a.length) {
           let o = a[0];
-          o.some((l) => l !== 0) ? (this.log(`Using keyId found in init segment ${Kt(o)}`), Ar.setKeyIdForUri(e.decryptdata.uri, o)) : (o = Ar.addKeyIdForUri(e.decryptdata.uri), this.log(`Generating keyId to patch media ${Kt(o)}`)), e.decryptdata.keyId = o;
+          o.some((l) => l !== 0) ? (this.log(`Using keyId found in init segment ${Kt(o)}`), Ai.setKeyIdForUri(e.decryptdata.uri, o)) : (o = Ai.addKeyIdForUri(e.decryptdata.uri), this.log(`Generating keyId to patch media ${Kt(o)}`)), e.decryptdata.keyId = o;
         }
       }
       if (!e.decryptdata.keyId && !Tt(t))
@@ -41997,7 +41997,7 @@ class Aw extends ni {
     return Promise.resolve(n);
   }
   loadKeyHTTP(e, t) {
-    const n = this.config, r = n.loader, s = new r(n);
+    const n = this.config, i = n.loader, s = new i(n);
     return t.keyLoader = e.loader = s, e.keyLoadPromise = new Promise((a, o) => {
       const l = {
         keyInfo: e,
@@ -42043,25 +42043,25 @@ class Aw extends ni {
     const {
       frag: t,
       keyInfo: n,
-      url: r
+      url: i
     } = e, s = n.loader;
     t.keyLoader === s && (t.keyLoader = null, n.loader = null);
-    const a = Xu(n.decryptdata) || r;
+    const a = Xu(n.decryptdata) || i;
     delete this.keyIdToKeyInfo[a], s && s.destroy();
   }
 }
-function Xu(i) {
-  if (i.keyFormat !== jt.FAIRPLAY) {
-    const e = i.keyId;
+function Xu(r) {
+  if (r.keyFormat !== jt.FAIRPLAY) {
+    const e = r.keyId;
     if (e)
       return Kt(e);
   }
-  return i.uri;
+  return r.uri;
 }
-function X1(i) {
+function X1(r) {
   const {
     type: e
-  } = i;
+  } = r;
   switch (e) {
     case Be.AUDIO_TRACK:
       return ce.AUDIO;
@@ -42071,11 +42071,11 @@ function X1(i) {
       return ce.MAIN;
   }
 }
-function Qu(i, e) {
-  let t = i.url;
+function Qu(r, e) {
+  let t = r.url;
   return (t === void 0 || t.indexOf("data:") === 0) && (t = e.url), t;
 }
-class xw {
+class x9 {
   constructor(e) {
     this.hls = void 0, this.loaders = /* @__PURE__ */ Object.create(null), this.variableList = null, this.onManifestLoaded = this.checkAutostartLoad, this.hls = e, this.registerListeners();
   }
@@ -42100,7 +42100,7 @@ class xw {
    * Returns defaults or configured loader-type overloads (pLoader and loader config params)
    */
   createInternalLoader(e) {
-    const t = this.hls.config, n = t.pLoader, r = t.loader, s = n || r, a = new s(t);
+    const t = this.hls.config, n = t.pLoader, i = t.loader, s = n || i, a = new s(t);
     return this.loaders[e.type] = a, a;
   }
   getInternalLoader(e) {
@@ -42138,7 +42138,7 @@ class xw {
   onLevelLoading(e, t) {
     const {
       id: n,
-      level: r,
+      level: i,
       pathwayId: s,
       url: a,
       deliveryDirectives: o,
@@ -42146,7 +42146,7 @@ class xw {
     } = t;
     this.load({
       id: n,
-      level: r,
+      level: i,
       pathwayId: s,
       responseType: "text",
       type: Be.LEVEL,
@@ -42158,14 +42158,14 @@ class xw {
   onAudioTrackLoading(e, t) {
     const {
       id: n,
-      groupId: r,
+      groupId: i,
       url: s,
       deliveryDirectives: a,
       track: o
     } = t;
     this.load({
       id: n,
-      groupId: r,
+      groupId: i,
       level: null,
       responseType: "text",
       type: Be.AUDIO_TRACK,
@@ -42177,14 +42177,14 @@ class xw {
   onSubtitleTrackLoading(e, t) {
     const {
       id: n,
-      groupId: r,
+      groupId: i,
       url: s,
       deliveryDirectives: a,
       track: o
     } = t;
     this.load({
       id: n,
-      groupId: r,
+      groupId: i,
       level: null,
       responseType: "text",
       type: Be.SUBTITLE_TRACK,
@@ -42196,27 +42196,27 @@ class xw {
   onLevelsUpdated(e, t) {
     const n = this.loaders[Be.LEVEL];
     if (n) {
-      const r = n.context;
-      r && !t.levels.some((s) => s === r.levelOrTrack) && (n.abort(), delete this.loaders[Be.LEVEL]);
+      const i = n.context;
+      i && !t.levels.some((s) => s === i.levelOrTrack) && (n.abort(), delete this.loaders[Be.LEVEL]);
     }
   }
   load(e) {
     var t;
     const n = this.hls.config;
-    let r = this.getInternalLoader(e);
-    if (r) {
-      const u = this.hls.logger, c = r.context;
+    let i = this.getInternalLoader(e);
+    if (i) {
+      const u = this.hls.logger, c = i.context;
       if (c && c.levelOrTrack === e.levelOrTrack && (c.url === e.url || c.deliveryDirectives && !e.deliveryDirectives)) {
         c.url === e.url ? u.log(`[playlist-loader]: ignore ${e.url} ongoing request`) : u.log(`[playlist-loader]: ignore ${e.url} in favor of ${c.url}`);
         return;
       }
-      u.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`), r.abort();
+      u.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`), i.abort();
     }
     let s;
     if (e.type === Be.MANIFEST ? s = n.manifestLoadPolicy.default : s = Qe({}, n.playlistLoadPolicy.default, {
       timeoutRetry: null,
       errorRetry: null
-    }), r = this.createInternalLoader(e), oe((t = e.deliveryDirectives) == null ? void 0 : t.part)) {
+    }), i = this.createInternalLoader(e), oe((t = e.deliveryDirectives) == null ? void 0 : t.part)) {
       let u;
       if (e.type === Be.LEVEL && e.level !== null ? u = this.hls.levels[e.level].details : e.type === Be.AUDIO_TRACK && e.id !== null ? u = this.hls.audioTracks[e.id].details : e.type === Be.SUBTITLE_TRACK && e.id !== null && (u = this.hls.subtitleTracks[e.id].details), u) {
         const c = u.partTarget, h = u.targetduration;
@@ -42240,7 +42240,7 @@ class xw {
         const f = this.getInternalLoader(h);
         this.resetInternalLoader(h.type);
         const m = u.data;
-        c.parsing.start = performance.now(), Pi.isMediaPlaylist(m) || h.type !== Be.MANIFEST ? this.handleTrackOrLevelPlaylist(u, c, h, d || null, f) : this.handleMasterPlaylist(u, c, h, d);
+        c.parsing.start = performance.now(), Pr.isMediaPlaylist(m) || h.type !== Be.MANIFEST ? this.handleTrackOrLevelPlaylist(u, c, h, d || null, f) : this.handleMasterPlaylist(u, c, h, d);
       },
       onError: (u, c, h, d) => {
         this.handleNetworkError(c, h, !1, u, d);
@@ -42249,7 +42249,7 @@ class xw {
         this.handleNetworkError(c, h, !0, void 0, u);
       }
     };
-    r.load(e, o, l);
+    i.load(e, o, l);
   }
   checkAutostartLoad() {
     if (!this.hls)
@@ -42263,10 +42263,10 @@ class xw {
     } = this.hls;
     (e || n) && (this.hls.logger.log(`${e ? "auto" : "force"} startLoad with configured startPosition ${t}`), this.hls.startLoad(t));
   }
-  handleMasterPlaylist(e, t, n, r) {
-    const s = this.hls, a = e.data, o = Qu(e, n), l = Pi.parseMasterPlaylist(a, o);
+  handleMasterPlaylist(e, t, n, i) {
+    const s = this.hls, a = e.data, o = Qu(e, n), l = Pr.parseMasterPlaylist(a, o);
     if (l.playlistParsingError) {
-      t.parsing.end = performance.now(), this.handleManifestParsingError(e, n, l.playlistParsingError, r, t);
+      t.parsing.end = performance.now(), this.handleManifestParsingError(e, n, l.playlistParsingError, i, t);
       return;
     }
     const {
@@ -42299,7 +42299,7 @@ class xw {
       AUDIO: g = [],
       SUBTITLES: p,
       "CLOSED-CAPTIONS": b
-    } = Pi.parseMasterPlaylistMedia(a, o, l);
+    } = Pr.parseMasterPlaylistMedia(a, o, l);
     g.length && !g.some((v) => !v.url) && c[0].audioCodec && !c[0].attrs.AUDIO && (this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"), g.unshift({
       type: "main",
       name: "main",
@@ -42319,19 +42319,19 @@ class xw {
       contentSteering: u,
       url: o,
       stats: t,
-      networkDetails: r,
+      networkDetails: i,
       sessionData: h,
       sessionKeys: d,
       startTimeOffset: f,
       variableList: m
     });
   }
-  handleTrackOrLevelPlaylist(e, t, n, r, s) {
+  handleTrackOrLevelPlaylist(e, t, n, i, s) {
     const a = this.hls, {
       id: o,
       level: l,
       type: u
-    } = n, c = Qu(e, n), h = oe(l) ? l : oe(o) ? o : 0, d = X1(n), f = Pi.parseLevelPlaylist(e.data, c, h, d, 0, this.variableList);
+    } = n, c = Qu(e, n), h = oe(l) ? l : oe(o) ? o : 0, d = X1(n), f = Pr.parseLevelPlaylist(e.data, c, h, d, 0, this.variableList);
     if (u === Be.MANIFEST) {
       const m = {
         attrs: new ct({}),
@@ -42340,12 +42340,12 @@ class xw {
         name: "",
         url: c
       };
-      f.requestScheduled = t.loading.start + i2(f, 0), a.trigger(S.MANIFEST_LOADED, {
+      f.requestScheduled = t.loading.start + r2(f, 0), a.trigger(S.MANIFEST_LOADED, {
         levels: [m],
         audioTracks: [],
         url: c,
         stats: t,
-        networkDetails: r,
+        networkDetails: i,
         sessionData: null,
         sessionKeys: null,
         contentSteering: null,
@@ -42353,9 +42353,9 @@ class xw {
         variableList: null
       });
     }
-    t.parsing.end = performance.now(), n.levelDetails = f, this.handlePlaylistLoaded(f, e, t, n, r, s);
+    t.parsing.end = performance.now(), n.levelDetails = f, this.handlePlaylistLoaded(f, e, t, n, i, s);
   }
-  handleManifestParsingError(e, t, n, r, s) {
+  handleManifestParsingError(e, t, n, i, s) {
     this.hls.trigger(S.ERROR, {
       type: fe.NETWORK_ERROR,
       details: G.MANIFEST_PARSING_ERROR,
@@ -42366,12 +42366,12 @@ class xw {
       reason: n.message,
       response: e,
       context: t,
-      networkDetails: r,
+      networkDetails: i,
       stats: s
     });
   }
-  handleNetworkError(e, t, n = !1, r, s) {
-    let a = `A network ${n ? "timeout" : "error" + (r ? " (status " + r.code + ")" : "")} occurred while loading ${e.type}`;
+  handleNetworkError(e, t, n = !1, i, s) {
+    let a = `A network ${n ? "timeout" : "error" + (i ? " (status " + i.code + ")" : "")} occurred while loading ${e.type}`;
     e.type === Be.LEVEL ? a += `: ${e.level} id: ${e.id}` : (e.type === Be.AUDIO_TRACK || e.type === Be.SUBTITLE_TRACK) && (a += ` id: ${e.id} group-id: "${e.groupId}"`);
     const o = new Error(a);
     this.hls.logger.warn(`[playlist-loader]: ${a}`);
@@ -42403,16 +42403,16 @@ class xw {
       networkDetails: t,
       stats: s
     };
-    if (r) {
+    if (i) {
       const d = (t == null ? void 0 : t.url) || e.url;
       h.response = je({
         url: d,
         data: void 0
-      }, r);
+      }, i);
     }
     this.hls.trigger(S.ERROR, h);
   }
-  handlePlaylistLoaded(e, t, n, r, s, a) {
+  handlePlaylistLoaded(e, t, n, i, s, a) {
     const o = this.hls, {
       type: l,
       level: u,
@@ -42420,8 +42420,8 @@ class xw {
       id: h,
       groupId: d,
       deliveryDirectives: f
-    } = r, m = Qu(t, r), g = X1(r);
-    let p = typeof r.level == "number" && g === ce.MAIN ? u : void 0;
+    } = i, m = Qu(t, i), g = X1(i);
+    let p = typeof i.level == "number" && g === ce.MAIN ? u : void 0;
     const b = e.playlistParsingError;
     if (b) {
       if (this.hls.logger.warn(`${b} ${e.url}`), !o.config.ignorePlaylistParsingErrors) {
@@ -42433,7 +42433,7 @@ class xw {
           error: b,
           reason: b.message,
           response: t,
-          context: r,
+          context: i,
           level: p,
           parent: g,
           networkDetails: s,
@@ -42453,7 +42453,7 @@ class xw {
         error: y,
         reason: y.message,
         response: t,
-        context: r,
+        context: i,
         level: p,
         parent: g,
         networkDetails: s,
@@ -42525,13 +42525,13 @@ class Cn {
    * Check if MediaSource Extensions are available and isTypeSupported checks pass for any baseline codecs.
    */
   static isSupported() {
-    return bw();
+    return b9();
   }
   /**
    * Get the MediaSource global used for MSE playback (ManagedMediaSource, MediaSource, or WebKitMediaSource).
    */
   static getMediaSource() {
-    return kr();
+    return ki();
   }
   static get Events() {
     return S;
@@ -42549,7 +42549,7 @@ class Cn {
    * Get the default configuration applied to new instances.
    */
   static get DefaultConfig() {
-    return Cn.defaultConfig ? Cn.defaultConfig : lw;
+    return Cn.defaultConfig ? Cn.defaultConfig : l9;
   }
   /**
    * Replace the default configuration applied to new instances.
@@ -42563,15 +42563,15 @@ class Cn {
    */
   constructor(e = {}) {
     this.config = void 0, this.userConfig = void 0, this.logger = void 0, this.coreComponents = void 0, this.networkControllers = void 0, this._emitter = new td(), this._autoLevelCapping = -1, this._maxHdcpLevel = null, this.abrController = void 0, this.bufferController = void 0, this.capLevelController = void 0, this.latencyController = void 0, this.levelController = void 0, this.streamController = void 0, this.audioStreamController = void 0, this.subtititleStreamController = void 0, this.audioTrackController = void 0, this.subtitleTrackController = void 0, this.interstitialsController = void 0, this.gapController = void 0, this.emeController = void 0, this.cmcdController = void 0, this._media = null, this._url = null, this._sessionId = void 0, this.triggeringException = void 0, this.started = !1;
-    const t = this.logger = RS(e.debug || !1, "Hls instance", e.assetPlayerId), n = this.config = cw(Cn.DefaultConfig, e, t);
-    this.userConfig = e, n.progressive && hw(n, t);
+    const t = this.logger = RS(e.debug || !1, "Hls instance", e.assetPlayerId), n = this.config = c9(Cn.DefaultConfig, e, t);
+    this.userConfig = e, n.progressive && h9(n, t);
     const {
-      abrController: r,
+      abrController: i,
       bufferController: s,
       capLevelController: a,
       errorController: o,
       fpsController: l
-    } = n, u = new o(this), c = this.abrController = new r(this), h = new wT(this), d = n.interstitialsController, f = d ? this.interstitialsController = new d(this, Cn) : null, m = this.bufferController = new s(this, h), g = this.capLevelController = new a(this), p = new l(this), b = new xw(this), y = n.contentSteeringController, v = y ? new y(this) : null, T = this.levelController = new yw(this, v), A = new _w(this), w = new Aw(this.config, this.logger), D = this.streamController = new Tw(this, h, w), L = this.gapController = new gw(this, h);
+    } = n, u = new o(this), c = this.abrController = new i(this), h = new wT(this), d = n.interstitialsController, f = d ? this.interstitialsController = new d(this, Cn) : null, m = this.bufferController = new s(this, h), g = this.capLevelController = new a(this), p = new l(this), b = new x9(this), y = n.contentSteeringController, v = y ? new y(this) : null, T = this.levelController = new y9(this, v), A = new _9(this), w = new A9(this.config, this.logger), D = this.streamController = new T9(this, h, w), L = this.gapController = new g9(this, h);
     g.setStreamController(D), p.setStreamController(D);
     const I = [b, T, D];
     f && I.splice(1, 0, f), v && I.splice(1, 0, v), this.networkControllers = I;
@@ -42580,7 +42580,7 @@ class Cn {
     const M = n.audioStreamController;
     M && I.push(this.audioStreamController = new M(this, h, w)), this.subtitleTrackController = this.createController(n.subtitleTrackController, I);
     const P = n.subtitleStreamController;
-    P && I.push(this.subtititleStreamController = new P(this, h, w)), this.createController(n.timelineController, R), w.emeController = this.emeController = this.createController(n.emeController, R), this.cmcdController = this.createController(n.cmcdController, R), this.latencyController = this.createController(vw, R), this.coreComponents = R, I.push(u);
+    P && I.push(this.subtititleStreamController = new P(this, h, w)), this.createController(n.timelineController, R), w.emeController = this.emeController = this.createController(n.emeController, R), this.cmcdController = this.createController(n.cmcdController, R), this.latencyController = this.createController(v9, R), this.coreComponents = R, I.push(u);
     const V = u.onErrorOut;
     typeof V == "function" && this.on(S.ERROR, V, u), this.on(S.MANIFEST_LOADED, b.onManifestLoaded, b);
   }
@@ -42601,8 +42601,8 @@ class Cn {
   removeAllListeners(e) {
     this._emitter.removeAllListeners(e);
   }
-  off(e, t, n = this, r) {
-    this._emitter.off(e, t, n, r);
+  off(e, t, n = this, i) {
+    this._emitter.off(e, t, n, i);
   }
   listeners(e) {
     return this._emitter.listeners(e);
@@ -42618,11 +42618,11 @@ class Cn {
     } catch (n) {
       if (this.logger.error("An internal error happened while handling event " + e + '. Error message: "' + n.message + '". Here is a stacktrace:', n), !this.triggeringException) {
         this.triggeringException = !0;
-        const r = e === S.ERROR;
+        const i = e === S.ERROR;
         this.trigger(S.ERROR, {
           type: fe.OTHER_ERROR,
           details: G.INTERNAL_EXCEPTION,
-          fatal: r,
+          fatal: i,
           event: e,
           error: n
         }), this.triggeringException = !1;
@@ -42656,10 +42656,10 @@ class Cn {
       return;
     }
     this.logger.log("attachMedia"), this._media && (this.logger.warn("media must be detached before attaching"), this.detachMedia());
-    const t = "media" in e, n = t ? e.media : e, r = t ? e : {
+    const t = "media" in e, n = t ? e.media : e, i = t ? e : {
       media: n
     };
-    this._media = n, this.trigger(S.MEDIA_ATTACHING, r);
+    this._media = n, this.trigger(S.MEDIA_ATTACHING, i);
   }
   /**
    * Detach Hls.js from the media
@@ -42682,10 +42682,10 @@ class Cn {
    */
   loadSource(e) {
     this.stopLoad();
-    const t = this.media, n = this._url, r = this._url = qh.buildAbsoluteURL(self.location.href, e, {
+    const t = this.media, n = this._url, i = this._url = qh.buildAbsoluteURL(self.location.href, e, {
       alwaysNormalize: !0
     });
-    this._autoLevelCapping = -1, this._maxHdcpLevel = null, this.logger.log(`loadSource:${r}`), t && n && (n !== r || this.bufferController.hasSourceTypes()) && (this.detachMedia(), this.attachMedia(t)), this.trigger(S.MANIFEST_LOADING, {
+    this._autoLevelCapping = -1, this._maxHdcpLevel = null, this.logger.log(`loadSource:${i}`), t && n && (n !== i || this.bufferController.hasSourceTypes()) && (this.detachMedia(), this.attachMedia(t)), this.trigger(S.MANIFEST_LOADING, {
       url: e
     });
   }
@@ -42787,7 +42787,7 @@ class Cn {
    */
   get sessionId() {
     let e = this._sessionId;
-    return e || (e = this._sessionId = g9()), e;
+    return e || (e = this._sessionId = gw()), e;
   }
   /**
    * @returns an array of levels (variants) sorted by HDCP-LEVEL, RESOLUTION (height), FRAME-RATE, CODECS, VIDEO-RANGE, and BANDWIDTH
@@ -42979,9 +42979,9 @@ class Cn {
     } = this;
     if (!e) return 0;
     const n = e.length;
-    for (let r = 0; r < n; r++)
-      if (e[r].maxBitrate >= t)
-        return r;
+    for (let i = 0; i < n; i++)
+      if (e[i].maxBitrate >= t)
+        return i;
     return 0;
   }
   /**
@@ -42993,14 +42993,14 @@ class Cn {
       autoLevelCapping: t,
       maxHdcpLevel: n
     } = this;
-    let r;
-    if (t === -1 && e != null && e.length ? r = e.length - 1 : r = t, n)
-      for (let s = r; s--; ) {
+    let i;
+    if (t === -1 && e != null && e.length ? i = e.length - 1 : i = t, n)
+      for (let s = i; s--; ) {
         const a = e[s].attrs["HDCP-LEVEL"];
         if (a && a <= n)
           return s;
       }
-    return r;
+    return i;
   }
   get firstAutoLevel() {
     return this.abrController.firstAutoLevel;
@@ -43216,188 +43216,188 @@ class Cn {
 }
 Cn.defaultConfig = void 0;
 const {
-  SvelteComponent: ww,
-  action_destroyer: Dw,
-  add_render_callback: kw,
+  SvelteComponent: w9,
+  action_destroyer: D9,
+  add_render_callback: k9,
   assign: Q1,
-  attr: _r,
-  binding_callbacks: Iw,
+  attr: _i,
+  binding_callbacks: I9,
   bubble: Zu,
-  children: Lw,
+  children: L9,
   claim_element: Z1,
-  claim_space: Rw,
-  create_slot: Cw,
+  claim_space: R9,
+  create_slot: C9,
   detach: Qo,
   element: J1,
   exclude_internal_props: eg,
-  get_all_dirty_from_scope: Fw,
-  get_slot_changes: Pw,
-  get_svelte_dataset: Mw,
-  init: Ow,
+  get_all_dirty_from_scope: F9,
+  get_slot_changes: P9,
+  get_svelte_dataset: M9,
+  init: O9,
   insert_hydration: Ju,
-  is_function: Bw,
+  is_function: B9,
   listen: qt,
-  raf: Nw,
-  run_all: $w,
-  safe_not_equal: Uw,
-  space: Hw,
+  raf: N9,
+  run_all: $9,
+  safe_not_equal: U9,
+  space: H9,
   src_url_equal: tg,
   toggle_class: ng,
-  transition_in: Gw,
-  transition_out: zw,
-  update_slot_base: qw
-} = window.__gradio__svelte__internal, { createEventDispatcher: Vw } = window.__gradio__svelte__internal;
-function Kw(i) {
-  let e, t = '', n, r, s, a, o = !1, l, u = !0, c, h, d, f;
+  transition_in: G9,
+  transition_out: z9,
+  update_slot_base: q9
+} = window.__gradio__svelte__internal, { createEventDispatcher: V9 } = window.__gradio__svelte__internal;
+function K9(r) {
+  let e, t = '', n, i, s, a, o = !1, l, u = !0, c, h, d, f;
   const m = (
     /*#slots*/
-    i[18].default
-  ), g = Cw(
+    r[18].default
+  ), g = C9(
     m,
-    i,
+    r,
     /*$$scope*/
-    i[17],
+    r[17],
     null
   );
   function p() {
-    cancelAnimationFrame(l), r.paused || (l = Nw(p), o = !0), i[22].call(r);
+    cancelAnimationFrame(l), i.paused || (l = N9(p), o = !0), r[22].call(i);
   }
   return {
     c() {
-      e = J1("div"), e.innerHTML = t, n = Hw(), r = J1("video"), g && g.c(), this.h();
+      e = J1("div"), e.innerHTML = t, n = H9(), i = J1("video"), g && g.c(), this.h();
     },
     l(b) {
-      e = Z1(b, "DIV", { class: !0, "data-svelte-h": !0 }), Mw(e) !== "svelte-mez4j5" && (e.innerHTML = t), n = Rw(b), r = Z1(b, "VIDEO", {
+      e = Z1(b, "DIV", { class: !0, "data-svelte-h": !0 }), M9(e) !== "svelte-mez4j5" && (e.innerHTML = t), n = R9(b), i = Z1(b, "VIDEO", {
         src: !0,
         preload: !0,
         "data-testid": !0,
         crossorigin: !0
       });
-      var y = Lw(r);
+      var y = L9(i);
       g && g.l(y), y.forEach(Qo), this.h();
     },
     h() {
-      _r(e, "class", "overlay svelte-1pwzuub"), ng(e, "hidden", !/*processingVideo*/
-      i[10]), tg(r.src, s = /*resolved_src*/
-      i[11]) || _r(r, "src", s), r.muted = /*muted*/
-      i[4], r.playsInline = /*playsinline*/
-      i[5], _r(
-        r,
+      _i(e, "class", "overlay svelte-1pwzuub"), ng(e, "hidden", !/*processingVideo*/
+      r[10]), tg(i.src, s = /*resolved_src*/
+      r[11]) || _i(i, "src", s), i.muted = /*muted*/
+      r[4], i.playsInline = /*playsinline*/
+      r[5], _i(
+        i,
         "preload",
         /*preload*/
-        i[6]
-      ), r.autoplay = /*autoplay*/
-      i[7], r.controls = /*controls*/
-      i[8], r.loop = /*loop*/
-      i[9], _r(r, "data-testid", a = /*$$props*/
-      i[13]["data-testid"]), _r(r, "crossorigin", "anonymous"), /*duration*/
-      i[2] === void 0 && kw(() => (
+        r[6]
+      ), i.autoplay = /*autoplay*/
+      r[7], i.controls = /*controls*/
+      r[8], i.loop = /*loop*/
+      r[9], _i(i, "data-testid", a = /*$$props*/
+      r[13]["data-testid"]), _i(i, "crossorigin", "anonymous"), /*duration*/
+      r[2] === void 0 && k9(() => (
         /*video_durationchange_handler*/
-        i[23].call(r)
+        r[23].call(i)
       ));
     },
     m(b, y) {
-      Ju(b, e, y), Ju(b, n, y), Ju(b, r, y), g && g.m(r, null), i[25](r), h = !0, d || (f = [
+      Ju(b, e, y), Ju(b, n, y), Ju(b, i, y), g && g.m(i, null), r[25](i), h = !0, d || (f = [
         qt(
-          r,
+          i,
           "loadeddata",
           /*dispatch*/
-          i[12].bind(null, "loadeddata")
+          r[12].bind(null, "loadeddata")
         ),
         qt(
-          r,
+          i,
           "click",
           /*dispatch*/
-          i[12].bind(null, "click")
+          r[12].bind(null, "click")
         ),
         qt(
-          r,
+          i,
           "play",
           /*dispatch*/
-          i[12].bind(null, "play")
+          r[12].bind(null, "play")
         ),
         qt(
-          r,
+          i,
           "pause",
           /*dispatch*/
-          i[12].bind(null, "pause")
+          r[12].bind(null, "pause")
         ),
         qt(
-          r,
+          i,
           "ended",
           /*dispatch*/
-          i[12].bind(null, "ended")
+          r[12].bind(null, "ended")
         ),
         qt(
-          r,
+          i,
           "mouseover",
           /*dispatch*/
-          i[12].bind(null, "mouseover")
+          r[12].bind(null, "mouseover")
         ),
         qt(
-          r,
+          i,
           "mouseout",
           /*dispatch*/
-          i[12].bind(null, "mouseout")
+          r[12].bind(null, "mouseout")
         ),
         qt(
-          r,
+          i,
           "focus",
           /*dispatch*/
-          i[12].bind(null, "focus")
+          r[12].bind(null, "focus")
         ),
         qt(
-          r,
+          i,
           "blur",
           /*dispatch*/
-          i[12].bind(null, "blur")
+          r[12].bind(null, "blur")
         ),
         qt(
-          r,
+          i,
           "error",
           /*dispatch*/
-          i[12].bind(null, "error", "Video not playable")
+          r[12].bind(null, "error", "Video not playable")
         ),
         qt(
-          r,
+          i,
           "loadstart",
           /*loadstart_handler*/
-          i[19]
+          r[19]
         ),
         qt(
-          r,
+          i,
           "loadeddata",
           /*loadeddata_handler*/
-          i[20]
+          r[20]
         ),
         qt(
-          r,
+          i,
           "loadedmetadata",
           /*loadedmetadata_handler*/
-          i[21]
+          r[21]
         ),
-        qt(r, "timeupdate", p),
+        qt(i, "timeupdate", p),
         qt(
-          r,
+          i,
           "durationchange",
           /*video_durationchange_handler*/
-          i[23]
+          r[23]
         ),
         qt(
-          r,
+          i,
           "play",
           /*video_play_pause_handler*/
-          i[24]
+          r[24]
         ),
         qt(
-          r,
+          i,
           "pause",
           /*video_play_pause_handler*/
-          i[24]
+          r[24]
         ),
-        Dw(c = SS.call(null, r, { autoplay: (
+        D9(c = SS.call(null, i, { autoplay: (
           /*autoplay*/
-          i[7] ?? !1
+          r[7] ?? !1
         ) }))
       ], d = !0);
     },
@@ -43405,70 +43405,70 @@ function Kw(i) {
       (!h || y & /*processingVideo*/
       1024) && ng(e, "hidden", !/*processingVideo*/
       b[10]), g && g.p && (!h || y & /*$$scope*/
-      131072) && qw(
+      131072) && q9(
         g,
         m,
         b,
         /*$$scope*/
         b[17],
-        h ? Pw(
+        h ? P9(
           m,
           /*$$scope*/
           b[17],
           y,
           null
-        ) : Fw(
+        ) : F9(
           /*$$scope*/
           b[17]
         ),
         null
       ), (!h || y & /*resolved_src*/
-      2048 && !tg(r.src, s = /*resolved_src*/
-      b[11])) && _r(r, "src", s), (!h || y & /*muted*/
-      16) && (r.muted = /*muted*/
+      2048 && !tg(i.src, s = /*resolved_src*/
+      b[11])) && _i(i, "src", s), (!h || y & /*muted*/
+      16) && (i.muted = /*muted*/
       b[4]), (!h || y & /*playsinline*/
-      32) && (r.playsInline = /*playsinline*/
+      32) && (i.playsInline = /*playsinline*/
       b[5]), (!h || y & /*preload*/
-      64) && _r(
-        r,
+      64) && _i(
+        i,
         "preload",
         /*preload*/
         b[6]
       ), (!h || y & /*autoplay*/
-      128) && (r.autoplay = /*autoplay*/
+      128) && (i.autoplay = /*autoplay*/
       b[7]), (!h || y & /*controls*/
-      256) && (r.controls = /*controls*/
+      256) && (i.controls = /*controls*/
       b[8]), (!h || y & /*loop*/
-      512) && (r.loop = /*loop*/
+      512) && (i.loop = /*loop*/
       b[9]), (!h || y & /*$$props*/
       8192 && a !== (a = /*$$props*/
-      b[13]["data-testid"])) && _r(r, "data-testid", a), !o && y & /*currentTime*/
+      b[13]["data-testid"])) && _i(i, "data-testid", a), !o && y & /*currentTime*/
       2 && !isNaN(
         /*currentTime*/
         b[1]
-      ) && (r.currentTime = /*currentTime*/
+      ) && (i.currentTime = /*currentTime*/
       b[1]), o = !1, y & /*paused*/
       8 && u !== (u = /*paused*/
-      b[3]) && r[u ? "pause" : "play"](), c && Bw(c.update) && y & /*autoplay*/
+      b[3]) && i[u ? "pause" : "play"](), c && B9(c.update) && y & /*autoplay*/
       128 && c.update.call(null, { autoplay: (
         /*autoplay*/
         b[7] ?? !1
       ) });
     },
     i(b) {
-      h || (Gw(g, b), h = !0);
+      h || (G9(g, b), h = !0);
     },
     o(b) {
-      zw(g, b), h = !1;
+      z9(g, b), h = !1;
     },
     d(b) {
-      b && (Qo(e), Qo(n), Qo(r)), g && g.d(b), i[25](null), d = !1, $w(f);
+      b && (Qo(e), Qo(n), Qo(i)), g && g.d(b), r[25](null), d = !1, $9(f);
     }
   };
 }
-function jw(i, e, t) {
-  let { $$slots: n = {}, $$scope: r } = e, { src: s = void 0 } = e, { muted: a = void 0 } = e, { playsinline: o = void 0 } = e, { preload: l = void 0 } = e, { autoplay: u = void 0 } = e, { controls: c = void 0 } = e, { currentTime: h = void 0 } = e, { duration: d = void 0 } = e, { paused: f = void 0 } = e, { node: m = void 0 } = e, { loop: g } = e, { is_stream: p } = e, { processingVideo: b = !1 } = e, y, v = !1, T;
-  const A = Vw();
+function j9(r, e, t) {
+  let { $$slots: n = {}, $$scope: i } = e, { src: s = void 0 } = e, { muted: a = void 0 } = e, { playsinline: o = void 0 } = e, { preload: l = void 0 } = e, { autoplay: u = void 0 } = e, { controls: c = void 0 } = e, { currentTime: h = void 0 } = e, { duration: d = void 0 } = e, { paused: f = void 0 } = e, { node: m = void 0 } = e, { loop: g } = e, { is_stream: p } = e, { processingVideo: b = !1 } = e, y, v = !1, T;
+  const A = V9();
   function w(U, J, Y) {
     if (!(!U || !J) && Cn.isSupported() && !v) {
       const X = new Cn({
@@ -43498,13 +43498,13 @@ function jw(i, e, t) {
     }
   }
   function D(U) {
-    Zu.call(this, i, U);
+    Zu.call(this, r, U);
   }
   function L(U) {
-    Zu.call(this, i, U);
+    Zu.call(this, r, U);
   }
   function I(U) {
-    Zu.call(this, i, U);
+    Zu.call(this, r, U);
   }
   function R() {
     h = this.currentTime, t(1, h);
@@ -43516,14 +43516,14 @@ function jw(i, e, t) {
     f = this.paused, t(3, f);
   }
   function V(U) {
-    Iw[U ? "unshift" : "push"](() => {
+    I9[U ? "unshift" : "push"](() => {
       m = U, t(0, m);
     });
   }
-  return i.$$set = (U) => {
-    t(13, e = Q1(Q1({}, e), eg(U))), "src" in U && t(14, s = U.src), "muted" in U && t(4, a = U.muted), "playsinline" in U && t(5, o = U.playsinline), "preload" in U && t(6, l = U.preload), "autoplay" in U && t(7, u = U.autoplay), "controls" in U && t(8, c = U.controls), "currentTime" in U && t(1, h = U.currentTime), "duration" in U && t(2, d = U.duration), "paused" in U && t(3, f = U.paused), "node" in U && t(0, m = U.node), "loop" in U && t(9, g = U.loop), "is_stream" in U && t(15, p = U.is_stream), "processingVideo" in U && t(10, b = U.processingVideo), "$$scope" in U && t(17, r = U.$$scope);
-  }, i.$$.update = () => {
-    if (i.$$.dirty & /*src, latest_src*/
+  return r.$$set = (U) => {
+    t(13, e = Q1(Q1({}, e), eg(U))), "src" in U && t(14, s = U.src), "muted" in U && t(4, a = U.muted), "playsinline" in U && t(5, o = U.playsinline), "preload" in U && t(6, l = U.preload), "autoplay" in U && t(7, u = U.autoplay), "controls" in U && t(8, c = U.controls), "currentTime" in U && t(1, h = U.currentTime), "duration" in U && t(2, d = U.duration), "paused" in U && t(3, f = U.paused), "node" in U && t(0, m = U.node), "loop" in U && t(9, g = U.loop), "is_stream" in U && t(15, p = U.is_stream), "processingVideo" in U && t(10, b = U.processingVideo), "$$scope" in U && t(17, i = U.$$scope);
+  }, r.$$.update = () => {
+    if (r.$$.dirty & /*src, latest_src*/
     81920) {
       t(11, y = s), t(16, T = s);
       const U = s;
@@ -43531,8 +43531,8 @@ function jw(i, e, t) {
         T === U && t(11, y = J);
       });
     }
-    i.$$.dirty & /*src*/
-    16384 && (v = !1), i.$$.dirty & /*node, src, is_stream*/
+    r.$$.dirty & /*src*/
+    16384 && (v = !1), r.$$.dirty & /*node, src, is_stream*/
     49153 && m && s && p && w(s, p, m);
   }, e = eg(e), [
     m,
@@ -43552,7 +43552,7 @@ function jw(i, e, t) {
     s,
     p,
     T,
-    r,
+    i,
     n,
     D,
     L,
@@ -43563,9 +43563,9 @@ function jw(i, e, t) {
     V
   ];
 }
-class md extends ww {
+class md extends w9 {
   constructor(e) {
-    super(), Ow(this, e, jw, Kw, Uw, {
+    super(), O9(this, e, j9, K9, U9, {
       src: 14,
       muted: 4,
       playsinline: 5,
@@ -43582,72 +43582,72 @@ class md extends ww {
     });
   }
 }
-var ig = Object.prototype.hasOwnProperty;
-function rg(i, e, t) {
-  for (t of i.keys())
+var rg = Object.prototype.hasOwnProperty;
+function ig(r, e, t) {
+  for (t of r.keys())
     if (Fa(t, e)) return t;
 }
-function Fa(i, e) {
-  var t, n, r;
-  if (i === e) return !0;
-  if (i && e && (t = i.constructor) === e.constructor) {
-    if (t === Date) return i.getTime() === e.getTime();
-    if (t === RegExp) return i.toString() === e.toString();
+function Fa(r, e) {
+  var t, n, i;
+  if (r === e) return !0;
+  if (r && e && (t = r.constructor) === e.constructor) {
+    if (t === Date) return r.getTime() === e.getTime();
+    if (t === RegExp) return r.toString() === e.toString();
     if (t === Array) {
-      if ((n = i.length) === e.length)
-        for (; n-- && Fa(i[n], e[n]); ) ;
+      if ((n = r.length) === e.length)
+        for (; n-- && Fa(r[n], e[n]); ) ;
       return n === -1;
     }
     if (t === Set) {
-      if (i.size !== e.size)
+      if (r.size !== e.size)
         return !1;
-      for (n of i)
-        if (r = n, r && typeof r == "object" && (r = rg(e, r), !r) || !e.has(r)) return !1;
+      for (n of r)
+        if (i = n, i && typeof i == "object" && (i = ig(e, i), !i) || !e.has(i)) return !1;
       return !0;
     }
     if (t === Map) {
-      if (i.size !== e.size)
+      if (r.size !== e.size)
         return !1;
-      for (n of i)
-        if (r = n[0], r && typeof r == "object" && (r = rg(e, r), !r) || !Fa(n[1], e.get(r)))
+      for (n of r)
+        if (i = n[0], i && typeof i == "object" && (i = ig(e, i), !i) || !Fa(n[1], e.get(i)))
           return !1;
       return !0;
     }
     if (t === ArrayBuffer)
-      i = new Uint8Array(i), e = new Uint8Array(e);
+      r = new Uint8Array(r), e = new Uint8Array(e);
     else if (t === DataView) {
-      if ((n = i.byteLength) === e.byteLength)
-        for (; n-- && i.getInt8(n) === e.getInt8(n); ) ;
+      if ((n = r.byteLength) === e.byteLength)
+        for (; n-- && r.getInt8(n) === e.getInt8(n); ) ;
       return n === -1;
     }
-    if (ArrayBuffer.isView(i)) {
-      if ((n = i.byteLength) === e.byteLength)
-        for (; n-- && i[n] === e[n]; ) ;
+    if (ArrayBuffer.isView(r)) {
+      if ((n = r.byteLength) === e.byteLength)
+        for (; n-- && r[n] === e[n]; ) ;
       return n === -1;
     }
-    if (!t || typeof i == "object") {
+    if (!t || typeof r == "object") {
       n = 0;
-      for (t in i)
-        if (ig.call(i, t) && ++n && !ig.call(e, t) || !(t in e) || !Fa(i[t], e[t])) return !1;
+      for (t in r)
+        if (rg.call(r, t) && ++n && !rg.call(e, t) || !(t in e) || !Fa(r[t], e[t])) return !1;
       return Object.keys(e).length === n;
     }
   }
-  return i !== i && e !== e;
+  return r !== r && e !== e;
 }
-function i4(i) {
-  return "video" in i ? i.video : "audio" in i ? i.audio : i.image;
+function r4(r) {
+  return "video" in r ? r.video : "audio" in r ? r.audio : r.image;
 }
-async function Ww(i) {
-  return i ? `
${(await Promise.all( - i.map(async (t) => { - const n = i4(t); +async function W9(r) { + return r ? `
${(await Promise.all( + r.map(async (t) => { + const n = r4(t); return !n || !n.url ? "" : await x6(n.url); }) )).filter((t) => t).map((t) => ``).join("")}
` : ""; } const { - SvelteComponent: Yw, - add_render_callback: Xw, + SvelteComponent: Y9, + add_render_callback: X9, append_hydration: yt, attr: Ue, binding_callbacks: ec, @@ -43660,20 +43660,20 @@ const { claim_text: so, create_component: Xt, destroy_component: Qt, - destroy_each: r4, + destroy_each: i4, detach: ke, element: ot, empty: Yl, ensure_array_like: Xl, - get_svelte_dataset: Lr, - globals: Qw, + get_svelte_dataset: Li, + globals: Q9, group_outros: Pn, - init: Zw, + init: Z9, insert_hydration: Ye, - is_function: Jw, + is_function: J9, listen: Js, mount_component: Zt, - noop: $i, + noop: $r, run_all: eD, safe_not_equal: tD, set_data: ao, @@ -43685,27 +43685,27 @@ const { toggle_class: Sn, transition_in: Ee, transition_out: Re -} = window.__gradio__svelte__internal, { window: s4 } = Qw, { createEventDispatcher: iD, onMount: rD } = window.__gradio__svelte__internal, { tick: sD } = window.__gradio__svelte__internal; -function ag(i, e, t) { - const n = i.slice(); +} = window.__gradio__svelte__internal, { window: s4 } = Q9, { createEventDispatcher: rD, onMount: iD } = window.__gradio__svelte__internal, { tick: sD } = window.__gradio__svelte__internal; +function ag(r, e, t) { + const n = r.slice(); return n[62] = e[t], n[64] = t, n; } -function og(i, e, t) { - const n = i.slice(); +function og(r, e, t) { + const n = r.slice(); return n[65] = e[t], n[66] = e, n[64] = t, n; } -function lg(i) { +function lg(r) { let e, t; return e = new v_({ props: { show_label: ( /*show_label*/ - i[2] + r[2] ), Icon: b_, label: ( /*label*/ - i[3] || "Gallery" + r[3] || "Gallery" ) } }), { @@ -43715,14 +43715,14 @@ function lg(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*show_label*/ + i[0] & /*show_label*/ 4 && (s.show_label = /*show_label*/ - n[2]), r[0] & /*label*/ + n[2]), i[0] & /*label*/ 8 && (s.label = /*label*/ n[3] || "Gallery"), e.$set(s); }, @@ -43737,29 +43737,29 @@ function lg(i) { } }; } -function aD(i) { - let e, t, n, r, s, a, o = ( +function aD(r) { + let e, t, n, i, s, a, o = ( /*selected_media*/ - i[29] && /*allow_preview*/ - i[7] && ug(i) + r[29] && /*allow_preview*/ + r[7] && ug(r) ), l = Xl( /*resolved_value*/ - i[22] + r[22] ), u = []; for (let d = 0; d < l.length; d += 1) - u[d] = _g(ag(i, l, d)); + u[d] = _g(ag(r, l, d)); const c = (d) => Re(u[d], 1, 1, () => { u[d] = null; }); let h = ( /*interactive*/ - i[12] && /*upload*/ - i[20] && /*stream_handler*/ - i[21] && vg(i) + r[12] && /*upload*/ + r[20] && /*stream_handler*/ + r[21] && vg(r) ); return { c() { - e = ot("div"), o && o.c(), t = It(), n = ot("div"), r = ot("div"); + e = ot("div"), o && o.c(), t = It(), n = ot("div"), i = ot("div"); for (let d = 0; d < u.length; d += 1) u[d].c(); s = It(), h && h.c(), this.h(); @@ -43769,62 +43769,62 @@ function aD(i) { var f = an(e); o && o.l(f), t = kt(f), n = at(f, "DIV", { class: !0 }); var m = an(n); - r = at(m, "DIV", { class: !0, style: !0 }); - var g = an(r); + i = at(m, "DIV", { class: !0, style: !0 }); + var g = an(i); for (let p = 0; p < u.length; p += 1) u[p].l(g); g.forEach(ke), m.forEach(ke), s = kt(f), h && h.l(f), f.forEach(ke), this.h(); }, h() { - Ue(r, "class", "grid-container svelte-11ssfn7"), qn( - r, + Ue(i, "class", "grid-container svelte-5rws6s"), qn( + i, "--grid-cols", /*columns*/ - i[4] + r[4] ), qn( - r, + i, "--grid-rows", /*rows*/ - i[5] + r[5] ), qn( - r, + i, "--object-fit", /*object_fit*/ - i[8] + r[8] ), qn( - r, + i, "height", /*height*/ - i[6] + r[6] ), Sn( - r, + i, "pt-6", /*show_label*/ - i[2] - ), Ue(n, "class", "grid-wrap svelte-11ssfn7"), Sn( + r[2] + ), Ue(n, "class", "grid-wrap svelte-5rws6s"), Sn( n, "minimal", /*mode*/ - i[13] === "minimal" + r[13] === "minimal" ), Sn( n, "fixed-height", /*mode*/ - i[13] !== "minimal" && (!/*height*/ - i[6] || /*height*/ - i[6] == "auto") + r[13] !== "minimal" && (!/*height*/ + r[6] || /*height*/ + r[6] == "auto") ), Sn( n, "hidden", /*is_full_screen*/ - i[24] - ), Ue(e, "class", "gallery-container svelte-11ssfn7"); + r[24] + ), Ue(e, "class", "gallery-container svelte-5rws6s"); }, m(d, f) { - Ye(d, e, f), o && o.m(e, null), yt(e, t), yt(e, n), yt(n, r); + Ye(d, e, f), o && o.m(e, null), yt(e, t), yt(e, n), yt(n, i); for (let m = 0; m < u.length; m += 1) - u[m] && u[m].m(r, null); - yt(e, s), h && h.m(e, null), i[56](e), a = !0; + u[m] && u[m].m(i, null); + yt(e, s), h && h.m(e, null), r[56](e), a = !0; }, p(d, f) { if (/*selected_media*/ @@ -43841,7 +43841,7 @@ function aD(i) { let m; for (m = 0; m < l.length; m += 1) { const g = ag(d, l, m); - u[m] ? (u[m].p(g, f), Ee(u[m], 1)) : (u[m] = _g(g), u[m].c(), Ee(u[m], 1), u[m].m(r, null)); + u[m] ? (u[m].p(g, f), Ee(u[m], 1)) : (u[m] = _g(g), u[m].c(), Ee(u[m], 1), u[m].m(i, null)); } for (Pn(), m = l.length; m < u.length; m += 1) c(m); @@ -43849,31 +43849,31 @@ function aD(i) { } (!a || f[0] & /*columns*/ 16) && qn( - r, + i, "--grid-cols", /*columns*/ d[4] ), (!a || f[0] & /*rows*/ 32) && qn( - r, + i, "--grid-rows", /*rows*/ d[5] ), (!a || f[0] & /*object_fit*/ 256) && qn( - r, + i, "--object-fit", /*object_fit*/ d[8] ), (!a || f[0] & /*height*/ 64) && qn( - r, + i, "height", /*height*/ d[6] ), (!a || f[0] & /*show_label*/ 4) && Sn( - r, + i, "pt-6", /*show_label*/ d[2] @@ -43920,18 +43920,18 @@ function aD(i) { Re(h), a = !1; }, d(d) { - d && ke(e), o && o.d(), r4(u, d), h && h.d(), i[56](null); + d && ke(e), o && o.d(), i4(u, d), h && h.d(), r[56](null); } }; } -function oD(i) { +function oD(r) { let e, t; return e = new g5({ props: { unpadded_box: !0, size: "large", $$slots: { default: [SD] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }), { c() { @@ -43940,13 +43940,13 @@ function oD(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[2] & /*$$scope*/ - 32 && (s.$$scope = { dirty: r, ctx: n }), e.$set(s); + i[2] & /*$$scope*/ + 32 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); }, i(n) { t || (Ee(e.$$.fragment, n), t = !0); @@ -43959,17 +43959,17 @@ function oD(i) { } }; } -function ug(i) { +function ug(r) { var T; - let e, t, n, r, s, a, o, l, u, c, h, d; + let e, t, n, i, s, a, o, l, u, c, h, d; t = new D_({ props: { display_top_corner: ( /*display_icon_button_wrapper_top_corner*/ - i[15] + r[15] ), $$slots: { default: [lD] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }); const f = [hD, cD, uD], m = []; @@ -43979,22 +43979,22 @@ function ug(i) { A[29] ? 1 : "audio" in /*selected_media*/ A[29] ? 2 : -1; } - ~(s = g(i)) && (a = m[s] = f[s](i)); + ~(s = g(r)) && (a = m[s] = f[s](r)); let p = ( /*selected_media*/ - ((T = i[29]) == null ? void 0 : T.caption) && mg(i) + ((T = r[29]) == null ? void 0 : T.caption) && mg(r) ), b = Xl( /*resolved_value*/ - i[22] + r[22] ), y = []; for (let A = 0; A < b.length; A += 1) - y[A] = gg(og(i, b, A)); + y[A] = gg(og(r, b, A)); const v = (A) => Re(y[A], 1, 1, () => { y[A] = null; }); return { c() { - e = ot("button"), Xt(t.$$.fragment), n = It(), r = ot("button"), a && a.c(), o = It(), p && p.c(), l = It(), u = ot("div"); + e = ot("button"), Xt(t.$$.fragment), n = It(), i = ot("button"), a && a.c(), o = It(), p && p.c(), l = It(), u = ot("div"); for (let A = 0; A < y.length; A += 1) y[A].c(); this.h(); @@ -44002,12 +44002,12 @@ function ug(i) { l(A) { e = at(A, "BUTTON", { class: !0 }); var w = an(e); - Yt(t.$$.fragment, w), n = kt(w), r = at(w, "BUTTON", { + Yt(t.$$.fragment, w), n = kt(w), i = at(w, "BUTTON", { class: !0, style: !0, "aria-label": !0 }); - var D = an(r); + var D = an(i); a && a.l(D), D.forEach(ke), o = kt(w), p && p.l(w), l = kt(w), u = at(w, "DIV", { class: !0, "data-testid": !0, @@ -44019,67 +44019,67 @@ function ug(i) { L.forEach(ke), w.forEach(ke), this.h(); }, h() { - Ue(r, "class", "media-button svelte-11ssfn7"), qn(r, "height", "calc(100% - " + /*selected_media*/ - (i[29].caption ? "80px" : "60px") + ")"), Ue(r, "aria-label", "detailed view of selected media"), Ue(u, "class", "thumbnails scroll-hide svelte-11ssfn7"), Ue(u, "data-testid", "container_el"), qn( + Ue(i, "class", "media-button svelte-5rws6s"), qn(i, "height", "calc(100% - " + /*selected_media*/ + (r[29].caption ? "80px" : "60px") + ")"), Ue(i, "aria-label", "detailed view of selected media"), Ue(u, "class", "thumbnails scroll-hide svelte-5rws6s"), Ue(u, "data-testid", "container_el"), qn( u, "justify-content", /*thumbnails_overflow*/ - i[28] ? "flex-start" : "center" - ), Ue(e, "class", "preview svelte-11ssfn7"), Sn( + r[28] ? "flex-start" : "center" + ), Ue(e, "class", "preview svelte-5rws6s"), Sn( e, "minimal", /*mode*/ - i[13] === "minimal" + r[13] === "minimal" ); }, m(A, w) { - Ye(A, e, w), Zt(t, e, null), yt(e, n), yt(e, r), ~s && m[s].m(r, null), yt(e, o), p && p.m(e, null), yt(e, l), yt(e, u); + Ye(A, e, w), Zt(t, e, null), yt(e, n), yt(e, i), ~s && m[s].m(i, null), yt(e, o), p && p.m(e, null), yt(e, l), yt(e, u); for (let D = 0; D < y.length; D += 1) y[D] && y[D].m(u, null); - i[51](u), c = !0, h || (d = [ - Js(r, "click", function() { - Jw("image" in /*selected_media*/ - i[29] ? ( + r[51](u), c = !0, h || (d = [ + Js(i, "click", function() { + J9("image" in /*selected_media*/ + r[29] ? ( /*click_handler_2*/ - i[48] + r[48] ) : null) && ("image" in /*selected_media*/ - i[29] ? ( + r[29] ? ( /*click_handler_2*/ - i[48] + r[48] ) : null).apply(this, arguments); }), Js( e, "keydown", /*on_keydown*/ - i[32] + r[32] ) ], h = !0); }, p(A, w) { var I; - i = A; + r = A; const D = {}; w[0] & /*display_icon_button_wrapper_top_corner*/ 32768 && (D.display_top_corner = /*display_icon_button_wrapper_top_corner*/ - i[15]), w[0] & /*selected_index, is_full_screen, i18n, resolved_value, show_share_button, fullscreen, show_fullscreen_button, selected_media, show_download_button*/ + r[15]), w[0] & /*selected_index, is_full_screen, i18n, resolved_value, show_share_button, fullscreen, show_fullscreen_button, selected_media, show_download_button*/ 557927938 | w[2] & /*$$scope*/ - 32 && (D.$$scope = { dirty: w, ctx: i }), t.$set(D); + 32 && (D.$$scope = { dirty: w, ctx: r }), t.$set(D); let L = s; - if (s = g(i), s === L ? ~s && m[s].p(i, w) : (a && (Pn(), Re(m[L], 1, 1, () => { + if (s = g(r), s === L ? ~s && m[s].p(r, w) : (a && (Pn(), Re(m[L], 1, 1, () => { m[L] = null; - }), Fn()), ~s ? (a = m[s], a ? a.p(i, w) : (a = m[s] = f[s](i), a.c()), Ee(a, 1), a.m(r, null)) : a = null), (!c || w[0] & /*selected_media*/ - 536870912) && qn(r, "height", "calc(100% - " + /*selected_media*/ - (i[29].caption ? "80px" : "60px") + ")"), /*selected_media*/ - (I = i[29]) != null && I.caption ? p ? p.p(i, w) : (p = mg(i), p.c(), p.m(e, l)) : p && (p.d(1), p = null), w[0] & /*resolved_value, el, selected_index, mode*/ + }), Fn()), ~s ? (a = m[s], a ? a.p(r, w) : (a = m[s] = f[s](r), a.c()), Ee(a, 1), a.m(i, null)) : a = null), (!c || w[0] & /*selected_media*/ + 536870912) && qn(i, "height", "calc(100% - " + /*selected_media*/ + (r[29].caption ? "80px" : "60px") + ")"), /*selected_media*/ + (I = r[29]) != null && I.caption ? p ? p.p(r, w) : (p = mg(r), p.c(), p.m(e, l)) : p && (p.d(1), p = null), w[0] & /*resolved_value, el, selected_index, mode*/ 71311362) { b = Xl( /*resolved_value*/ - i[22] + r[22] ); let R; for (R = 0; R < b.length; R += 1) { - const M = og(i, b, R); + const M = og(r, b, R); y[R] ? (y[R].p(M, w), Ee(y[R], 1)) : (y[R] = gg(M), y[R].c(), Ee(y[R], 1), y[R].m(u, null)); } for (Pn(), R = b.length; R < y.length; R += 1) @@ -44091,13 +44091,13 @@ function ug(i) { u, "justify-content", /*thumbnails_overflow*/ - i[28] ? "flex-start" : "center" + r[28] ? "flex-start" : "center" ), (!c || w[0] & /*mode*/ 8192) && Sn( e, "minimal", /*mode*/ - i[13] === "minimal" + r[13] === "minimal" ); }, i(A) { @@ -44115,24 +44115,24 @@ function ug(i) { c = !1; }, d(A) { - A && ke(e), Qt(t), ~s && m[s].d(), p && p.d(), r4(y, A), i[51](null), h = !1, eD(d); + A && ke(e), Qt(t), ~s && m[s].d(), p && p.d(), i4(y, A), r[51](null), h = !1, eD(d); } }; } -function cg(i) { +function cg(r) { let e, t; - return e = new Pr({ + return e = new Pi({ props: { Icon: P5, label: ( /*i18n*/ - i[11]("common.download") + r[11]("common.download") ) } }), e.$on( "click", /*click_handler*/ - i[43] + r[43] ), { c() { Xt(e.$$.fragment); @@ -44140,12 +44140,12 @@ function cg(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*i18n*/ + i[0] & /*i18n*/ 2048 && (s.label = /*i18n*/ n[11]("common.download")), e.$set(s); }, @@ -44160,17 +44160,17 @@ function cg(i) { } }; } -function hg(i) { +function hg(r) { let e, t; return e = new wE({ props: { fullscreen: ( /*fullscreen*/ - i[16] + r[16] ) } }), e.$on( "fullscreen", /*fullscreen_handler*/ - i[44] + r[44] ), { c() { Xt(e.$$.fragment); @@ -44178,12 +44178,12 @@ function hg(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*fullscreen*/ + i[0] & /*fullscreen*/ 65536 && (s.fullscreen = /*fullscreen*/ n[16]), e.$set(s); }, @@ -44198,68 +44198,68 @@ function hg(i) { } }; } -function dg(i) { +function dg(r) { let e, t, n; return t = new N6({ props: { i18n: ( /*i18n*/ - i[11] + r[11] ), value: ( /*resolved_value*/ - i[22] + r[22] ), - formatter: Ww + formatter: W9 } }), t.$on( "share", /*share_handler*/ - i[45] + r[45] ), t.$on( "error", /*error_handler*/ - i[46] + r[46] ), { c() { e = ot("div"), Xt(t.$$.fragment), this.h(); }, - l(r) { - e = at(r, "DIV", { class: !0 }); + l(i) { + e = at(i, "DIV", { class: !0 }); var s = an(e); Yt(t.$$.fragment, s), s.forEach(ke), this.h(); }, h() { Ue(e, "class", "icon-button"); }, - m(r, s) { - Ye(r, e, s), Zt(t, e, null), n = !0; + m(i, s) { + Ye(i, e, s), Zt(t, e, null), n = !0; }, - p(r, s) { + p(i, s) { const a = {}; s[0] & /*i18n*/ 2048 && (a.i18n = /*i18n*/ - r[11]), s[0] & /*resolved_value*/ + i[11]), s[0] & /*resolved_value*/ 4194304 && (a.value = /*resolved_value*/ - r[22]), t.$set(a); + i[22]), t.$set(a); }, - i(r) { - n || (Ee(t.$$.fragment, r), n = !0); + i(i) { + n || (Ee(t.$$.fragment, i), n = !0); }, - o(r) { - Re(t.$$.fragment, r), n = !1; + o(i) { + Re(t.$$.fragment, i), n = !1; }, - d(r) { - r && ke(e), Qt(t); + d(i) { + i && ke(e), Qt(t); } }; } -function fg(i) { +function fg(r) { let e, t; - return e = new Pr({ props: { Icon: Ph, label: "Close" } }), e.$on( + return e = new Pi({ props: { Icon: Ph, label: "Close" } }), e.$on( "click", /*click_handler_1*/ - i[47] + r[47] ), { c() { Xt(e.$$.fragment); @@ -44267,10 +44267,10 @@ function fg(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p: $i, + p: $r, i(n) { t || (Ee(e.$$.fragment, n), t = !0); }, @@ -44282,27 +44282,27 @@ function fg(i) { } }; } -function lD(i) { - let e, t, n, r, s, a = ( +function lD(r) { + let e, t, n, i, s, a = ( /*show_download_button*/ - i[10] && cg(i) + r[10] && cg(r) ), o = ( /*show_fullscreen_button*/ - i[14] && hg(i) + r[14] && hg(r) ), l = ( /*show_share_button*/ - i[9] && dg(i) + r[9] && dg(r) ), u = !/*is_full_screen*/ - i[24] && fg(i); + r[24] && fg(r); return { c() { - a && a.c(), e = It(), o && o.c(), t = It(), l && l.c(), n = It(), u && u.c(), r = Yl(); + a && a.c(), e = It(), o && o.c(), t = It(), l && l.c(), n = It(), u && u.c(), i = Yl(); }, l(c) { - a && a.l(c), e = kt(c), o && o.l(c), t = kt(c), l && l.l(c), n = kt(c), u && u.l(c), r = Yl(); + a && a.l(c), e = kt(c), o && o.l(c), t = kt(c), l && l.l(c), n = kt(c), u && u.l(c), i = Yl(); }, m(c, h) { - a && a.m(c, h), Ye(c, e, h), o && o.m(c, h), Ye(c, t, h), l && l.m(c, h), Ye(c, n, h), u && u.m(c, h), Ye(c, r, h), s = !0; + a && a.m(c, h), Ye(c, e, h), o && o.m(c, h), Ye(c, t, h), l && l.m(c, h), Ye(c, n, h), u && u.m(c, h), Ye(c, i, h), s = !0; }, p(c, h) { /*show_download_button*/ @@ -44321,7 +44321,7 @@ function lD(i) { c[24] ? u && (Pn(), Re(u, 1, 1, () => { u = null; }), Fn()) : u ? (u.p(c, h), h[0] & /*is_full_screen*/ - 16777216 && Ee(u, 1)) : (u = fg(c), u.c(), Ee(u, 1), u.m(r.parentNode, r)); + 16777216 && Ee(u, 1)) : (u = fg(c), u.c(), Ee(u, 1), u.m(i.parentNode, i)); }, i(c) { s || (Ee(a), Ee(o), Ee(l), Ee(u), s = !0); @@ -44330,23 +44330,23 @@ function lD(i) { Re(a), Re(o), Re(l), Re(u), s = !1; }, d(c) { - c && (ke(e), ke(t), ke(n), ke(r)), a && a.d(c), o && o.d(c), l && l.d(c), u && u.d(c); + c && (ke(e), ke(t), ke(n), ke(i)), a && a.d(c), o && o.d(c), l && l.d(c), u && u.d(c); } }; } -function uD(i) { - let e, t, n = '', r, s, a = ( +function uD(r) { + let e, t, n = '', i, s, a = ( /*selected_media*/ - (i[29].audio.orig_name || "Audio") + "" + (r[29].audio.orig_name || "Audio") + "" ), o, l, u, c; return { c() { - e = ot("div"), t = ot("div"), t.innerHTML = n, r = It(), s = ot("div"), o = oo(a), l = It(), u = ot("audio"), this.h(); + e = ot("div"), t = ot("div"), t.innerHTML = n, i = It(), s = ot("div"), o = oo(a), l = It(), u = ot("audio"), this.h(); }, l(h) { e = at(h, "DIV", { class: !0 }); var d = an(e); - t = at(d, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(t) !== "svelte-1dpn7ey" && (t.innerHTML = n), r = kt(d), s = at(d, "DIV", { class: !0 }); + t = at(d, "DIV", { class: !0, "data-svelte-h": !0 }), Li(t) !== "svelte-1dpn7ey" && (t.innerHTML = n), i = kt(d), s = at(d, "DIV", { class: !0 }); var f = an(s); o = so(f, a), f.forEach(ke), l = kt(d), u = at(d, "AUDIO", { src: !0, @@ -44355,11 +44355,11 @@ function uD(i) { }), an(u).forEach(ke), d.forEach(ke), this.h(); }, h() { - Ue(t, "class", "audio-icon-large svelte-11ssfn7"), Ue(s, "class", "audio-filename svelte-11ssfn7"), sg(u.src, c = /*selected_media*/ - i[29].audio.url) || Ue(u, "src", c), u.controls = !0, Ue(u, "class", "audio-player svelte-11ssfn7"), Ue(u, "data-testid", "detailed-audio"), Ue(e, "class", "audio-preview svelte-11ssfn7"); + Ue(t, "class", "audio-icon-large svelte-5rws6s"), Ue(s, "class", "audio-filename svelte-5rws6s"), sg(u.src, c = /*selected_media*/ + r[29].audio.url) || Ue(u, "src", c), u.controls = !0, Ue(u, "class", "audio-player svelte-5rws6s"), Ue(u, "data-testid", "detailed-audio"), Ue(e, "class", "audio-preview svelte-5rws6s"); }, m(h, d) { - Ye(h, e, d), yt(e, t), yt(e, r), yt(e, s), yt(s, o), yt(e, l), yt(e, u); + Ye(h, e, d), yt(e, t), yt(e, i), yt(e, s), yt(s, o), yt(e, l), yt(e, u); }, p(h, d) { d[0] & /*selected_media*/ @@ -44368,25 +44368,25 @@ function uD(i) { 536870912 && !sg(u.src, c = /*selected_media*/ h[29].audio.url) && Ue(u, "src", c); }, - i: $i, - o: $i, + i: $r, + o: $r, d(h) { h && ke(e); } }; } -function cD(i) { +function cD(r) { let e, t; return e = new md({ props: { src: ( /*selected_media*/ - i[29].video.url + r[29].video.url ), "data-testid": "detailed-video", alt: ( /*selected_media*/ - i[29].caption || "" + r[29].caption || "" ), loading: "lazy", loop: !1, @@ -44401,14 +44401,14 @@ function cD(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*selected_media*/ + i[0] & /*selected_media*/ 536870912 && (s.src = /*selected_media*/ - n[29].video.url), r[0] & /*selected_media*/ + n[29].video.url), i[0] & /*selected_media*/ 536870912 && (s.alt = /*selected_media*/ n[29].caption || ""), e.$set(s); }, @@ -44423,26 +44423,26 @@ function cD(i) { } }; } -function hD(i) { +function hD(r) { let e, t; return e = new zh({ props: { "data-testid": "detailed-image", src: ( /*selected_media*/ - i[29].image.url + r[29].image.url ), alt: ( /*selected_media*/ - i[29].caption || "" + r[29].caption || "" ), title: ( /*selected_media*/ - i[29].caption || null + r[29].caption || null ), class: ( /*selected_media*/ - i[29].caption && "with-caption" + r[29].caption && "with-caption" ), loading: "lazy" } @@ -44453,18 +44453,18 @@ function hD(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*selected_media*/ + i[0] & /*selected_media*/ 536870912 && (s.src = /*selected_media*/ - n[29].image.url), r[0] & /*selected_media*/ + n[29].image.url), i[0] & /*selected_media*/ 536870912 && (s.alt = /*selected_media*/ - n[29].caption || ""), r[0] & /*selected_media*/ + n[29].caption || ""), i[0] & /*selected_media*/ 536870912 && (s.title = /*selected_media*/ - n[29].caption || null), r[0] & /*selected_media*/ + n[29].caption || null), i[0] & /*selected_media*/ 536870912 && (s.class = /*selected_media*/ n[29].caption && "with-caption"), e.$set(s); }, @@ -44479,74 +44479,74 @@ function hD(i) { } }; } -function mg(i) { +function mg(r) { let e, t = ( /*selected_media*/ - i[29].caption + "" + r[29].caption + "" ), n; return { c() { e = ot("caption"), n = oo(t), this.h(); }, - l(r) { - e = at(r, "CAPTION", { class: !0 }); + l(i) { + e = at(i, "CAPTION", { class: !0 }); var s = an(e); n = so(s, t), s.forEach(ke), this.h(); }, h() { - Ue(e, "class", "caption svelte-11ssfn7"); + Ue(e, "class", "caption svelte-5rws6s"); }, - m(r, s) { - Ye(r, e, s), yt(e, n); + m(i, s) { + Ye(i, e, s), yt(e, n); }, - p(r, s) { + p(i, s) { s[0] & /*selected_media*/ 536870912 && t !== (t = /*selected_media*/ - r[29].caption + "") && ao(n, t); + i[29].caption + "") && ao(n, t); }, - d(r) { - r && ke(e); + d(i) { + i && ke(e); } }; } -function dD(i) { +function dD(r) { let e, t = ''; return { c() { e = ot("div"), e.innerHTML = t, this.h(); }, l(n) { - e = at(n, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(e) !== "svelte-staix" && (e.innerHTML = t), this.h(); + e = at(n, "DIV", { class: !0, "data-svelte-h": !0 }), Li(e) !== "svelte-staix" && (e.innerHTML = t), this.h(); }, h() { - Ue(e, "class", "audio-thumbnail svelte-11ssfn7"); + Ue(e, "class", "audio-thumbnail svelte-5rws6s"); }, - m(n, r) { - Ye(n, e, r); + m(n, i) { + Ye(n, e, i); }, - p: $i, - i: $i, - o: $i, + p: $r, + i: $r, + o: $r, d(n) { n && ke(e); } }; } -function fD(i) { - let e, t, n, r; +function fD(r) { + let e, t, n, i; return e = new E_({}), n = new md({ props: { src: ( /*media*/ - i[65].video.url + r[65].video.url ), title: ( /*media*/ - i[65].caption || null + r[65].caption || null ), is_stream: !1, "data-testid": "thumbnail " + /*i*/ - (i[64] + 1), + (r[64] + 1), alt: "", loading: "lazy", loop: !1 @@ -44559,7 +44559,7 @@ function fD(i) { Yt(e.$$.fragment, s), t = kt(s), Yt(n.$$.fragment, s); }, m(s, a) { - Zt(e, s, a), Ye(s, t, a), Zt(n, s, a), r = !0; + Zt(e, s, a), Ye(s, t, a), Zt(n, s, a), i = !0; }, p(s, a) { const o = {}; @@ -44570,30 +44570,30 @@ function fD(i) { s[65].caption || null), n.$set(o); }, i(s) { - r || (Ee(e.$$.fragment, s), Ee(n.$$.fragment, s), r = !0); + i || (Ee(e.$$.fragment, s), Ee(n.$$.fragment, s), i = !0); }, o(s) { - Re(e.$$.fragment, s), Re(n.$$.fragment, s), r = !1; + Re(e.$$.fragment, s), Re(n.$$.fragment, s), i = !1; }, d(s) { s && ke(t), Qt(e, s), Qt(n, s); } }; } -function mD(i) { +function mD(r) { let e, t; return e = new zh({ props: { src: ( /*media*/ - i[65].image.url + r[65].image.url ), title: ( /*media*/ - i[65].caption || null + r[65].caption || null ), "data-testid": "thumbnail " + /*i*/ - (i[64] + 1), + (r[64] + 1), alt: "", loading: "lazy" } @@ -44604,14 +44604,14 @@ function mD(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*resolved_value*/ + i[0] & /*resolved_value*/ 4194304 && (s.src = /*media*/ - n[65].image.url), r[0] & /*resolved_value*/ + n[65].image.url), i[0] & /*resolved_value*/ 4194304 && (s.title = /*media*/ n[65].caption || null), e.$set(s); }, @@ -44626,10 +44626,10 @@ function mD(i) { } }; } -function gg(i) { - let e, t, n, r, s, a = ( +function gg(r) { + let e, t, n, i, s, a = ( /*i*/ - i[64] + r[64] ), o, l, u; const c = [mD, fD, dD], h = []; function d(p, b) { @@ -44638,65 +44638,65 @@ function gg(i) { p[65] ? 1 : "audio" in /*media*/ p[65] ? 2 : -1; } - ~(t = d(i)) && (n = h[t] = c[t](i)); + ~(t = d(r)) && (n = h[t] = c[t](r)); const f = () => ( /*button_binding*/ - i[49](e, a) + r[49](e, a) ), m = () => ( /*button_binding*/ - i[49](null, a) + r[49](null, a) ); function g() { return ( /*click_handler_3*/ - i[50]( + r[50]( /*i*/ - i[64] + r[64] ) ); } return { c() { - e = ot("button"), n && n.c(), r = It(), this.h(); + e = ot("button"), n && n.c(), i = It(), this.h(); }, l(p) { e = at(p, "BUTTON", { class: !0, "aria-label": !0 }); var b = an(e); - n && n.l(b), r = kt(b), b.forEach(ke), this.h(); + n && n.l(b), i = kt(b), b.forEach(ke), this.h(); }, h() { - Ue(e, "class", "thumbnail-item thumbnail-small svelte-11ssfn7"), Ue(e, "aria-label", s = "Thumbnail " + /*i*/ - (i[64] + 1) + " of " + /*resolved_value*/ - i[22].length), Sn( + Ue(e, "class", "thumbnail-item thumbnail-small svelte-5rws6s"), Ue(e, "aria-label", s = "Thumbnail " + /*i*/ + (r[64] + 1) + " of " + /*resolved_value*/ + r[22].length), Sn( e, "selected", /*selected_index*/ - i[1] === /*i*/ - i[64] && /*mode*/ - i[13] !== "minimal" + r[1] === /*i*/ + r[64] && /*mode*/ + r[13] !== "minimal" ); }, m(p, b) { - Ye(p, e, b), ~t && h[t].m(e, null), yt(e, r), f(), o = !0, l || (u = Js(e, "click", g), l = !0); + Ye(p, e, b), ~t && h[t].m(e, null), yt(e, i), f(), o = !0, l || (u = Js(e, "click", g), l = !0); }, p(p, b) { - i = p; + r = p; let y = t; - t = d(i), t === y ? ~t && h[t].p(i, b) : (n && (Pn(), Re(h[y], 1, 1, () => { + t = d(r), t === y ? ~t && h[t].p(r, b) : (n && (Pn(), Re(h[y], 1, 1, () => { h[y] = null; - }), Fn()), ~t ? (n = h[t], n ? n.p(i, b) : (n = h[t] = c[t](i), n.c()), Ee(n, 1), n.m(e, r)) : n = null), (!o || b[0] & /*resolved_value*/ + }), Fn()), ~t ? (n = h[t], n ? n.p(r, b) : (n = h[t] = c[t](r), n.c()), Ee(n, 1), n.m(e, i)) : n = null), (!o || b[0] & /*resolved_value*/ 4194304 && s !== (s = "Thumbnail " + /*i*/ - (i[64] + 1) + " of " + /*resolved_value*/ - i[22].length)) && Ue(e, "aria-label", s), a !== /*i*/ - i[64] && (m(), a = /*i*/ - i[64], f()), (!o || b[0] & /*selected_index, mode*/ + (r[64] + 1) + " of " + /*resolved_value*/ + r[22].length)) && Ue(e, "aria-label", s), a !== /*i*/ + r[64] && (m(), a = /*i*/ + r[64], f()), (!o || b[0] & /*selected_index, mode*/ 8194) && Sn( e, "selected", /*selected_index*/ - i[1] === /*i*/ - i[64] && /*mode*/ - i[13] !== "minimal" + r[1] === /*i*/ + r[64] && /*mode*/ + r[13] !== "minimal" ); }, i(p) { @@ -44710,60 +44710,60 @@ function gg(i) { } }; } -function gD(i) { - let e, t = '', n, r, s = ''; +function gD(r) { + let e, t = '', n, i, s = ''; return { c() { - e = ot("div"), e.innerHTML = t, n = It(), r = ot("div"), r.innerHTML = s, this.h(); + e = ot("div"), e.innerHTML = t, n = It(), i = ot("div"), i.innerHTML = s, this.h(); }, l(a) { - e = at(a, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(e) !== "svelte-8jqs07" && (e.innerHTML = t), n = kt(a), r = at(a, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(r) !== "svelte-haudjb" && (r.innerHTML = s), this.h(); + e = at(a, "DIV", { class: !0, "data-svelte-h": !0 }), Li(e) !== "svelte-8jqs07" && (e.innerHTML = t), n = kt(a), i = at(a, "DIV", { class: !0, "data-svelte-h": !0 }), Li(i) !== "svelte-haudjb" && (i.innerHTML = s), this.h(); }, h() { - Ue(e, "class", "audio-thumbnail-lg svelte-11ssfn7"), Ue(r, "class", "media-type-badge audio svelte-11ssfn7"); + Ue(e, "class", "audio-thumbnail-lg svelte-5rws6s"), Ue(i, "class", "media-type-badge audio svelte-5rws6s"); }, m(a, o) { - Ye(a, e, o), Ye(a, n, o), Ye(a, r, o); + Ye(a, e, o), Ye(a, n, o), Ye(a, i, o); }, - p: $i, - i: $i, - o: $i, + p: $r, + i: $r, + o: $r, d(a) { - a && (ke(e), ke(n), ke(r)); + a && (ke(e), ke(n), ke(i)); } }; } -function pD(i) { - let e, t, n, r, s, a = '', o; +function pD(r) { + let e, t, n, i, s, a = '', o; return e = new E_({}), n = new md({ props: { src: ( /*entry*/ - i[62].video.url + r[62].video.url ), title: ( /*entry*/ - i[62].caption || null + r[62].caption || null ), is_stream: !1, "data-testid": "thumbnail " + /*i*/ - (i[64] + 1), + (r[64] + 1), alt: "", loading: "lazy", loop: !1 } }), { c() { - Xt(e.$$.fragment), t = It(), Xt(n.$$.fragment), r = It(), s = ot("div"), s.innerHTML = a, this.h(); + Xt(e.$$.fragment), t = It(), Xt(n.$$.fragment), i = It(), s = ot("div"), s.innerHTML = a, this.h(); }, l(l) { - Yt(e.$$.fragment, l), t = kt(l), Yt(n.$$.fragment, l), r = kt(l), s = at(l, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(s) !== "svelte-sjkuff" && (s.innerHTML = a), this.h(); + Yt(e.$$.fragment, l), t = kt(l), Yt(n.$$.fragment, l), i = kt(l), s = at(l, "DIV", { class: !0, "data-svelte-h": !0 }), Li(s) !== "svelte-sjkuff" && (s.innerHTML = a), this.h(); }, h() { - Ue(s, "class", "media-type-badge video svelte-11ssfn7"); + Ue(s, "class", "media-type-badge video svelte-5rws6s"); }, m(l, u) { - Zt(e, l, u), Ye(l, t, u), Zt(n, l, u), Ye(l, r, u), Ye(l, s, u), o = !0; + Zt(e, l, u), Ye(l, t, u), Zt(n, l, u), Ye(l, i, u), Ye(l, s, u), o = !0; }, p(l, u) { const c = {}; @@ -44780,37 +44780,37 @@ function pD(i) { Re(e.$$.fragment, l), Re(n.$$.fragment, l), o = !1; }, d(l) { - l && (ke(t), ke(r), ke(s)), Qt(e, l), Qt(n, l); + l && (ke(t), ke(i), ke(s)), Qt(e, l), Qt(n, l); } }; } -function _D(i) { - let e, t, n, r = '', s; +function _D(r) { + let e, t, n, i = '', s; return e = new zh({ props: { alt: ( /*entry*/ - i[62].caption || "" + r[62].caption || "" ), src: typeof /*entry*/ - i[62].image == "string" ? ( + r[62].image == "string" ? ( /*entry*/ - i[62].image + r[62].image ) : ( /*entry*/ - i[62].image.url + r[62].image.url ), loading: "lazy" } }), { c() { - Xt(e.$$.fragment), t = It(), n = ot("div"), n.innerHTML = r, this.h(); + Xt(e.$$.fragment), t = It(), n = ot("div"), n.innerHTML = i, this.h(); }, l(a) { - Yt(e.$$.fragment, a), t = kt(a), n = at(a, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(n) !== "svelte-122utgm" && (n.innerHTML = r), this.h(); + Yt(e.$$.fragment, a), t = kt(a), n = at(a, "DIV", { class: !0, "data-svelte-h": !0 }), Li(n) !== "svelte-122utgm" && (n.innerHTML = i), this.h(); }, h() { - Ue(n, "class", "media-type-badge image svelte-11ssfn7"); + Ue(n, "class", "media-type-badge image svelte-5rws6s"); }, m(a, o) { Zt(e, a, o), Ye(a, t, o), Ye(a, n, o), s = !0; @@ -44840,14 +44840,14 @@ function _D(i) { } }; } -function pg(i) { - let e, t = '', n, r; +function pg(r) { + let e, t = '', n, i; function s() { return ( /*click_handler_5*/ - i[53]( + r[53]( /*i*/ - i[64] + r[64] ) ); } @@ -44860,26 +44860,26 @@ function pg(i) { class: !0, "aria-label": !0, "data-svelte-h": !0 - }), Lr(e) !== "svelte-1glxy0k" && (e.innerHTML = t), this.h(); + }), Li(e) !== "svelte-1glxy0k" && (e.innerHTML = t), this.h(); }, h() { - Ue(e, "class", "remove-btn svelte-11ssfn7"), Ue(e, "aria-label", "Remove item"); + Ue(e, "class", "remove-btn svelte-5rws6s"), Ue(e, "aria-label", "Remove item"); }, m(a, o) { - Ye(a, e, o), n || (r = Js(e, "click", nD(s)), n = !0); + Ye(a, e, o), n || (i = Js(e, "click", nD(s)), n = !0); }, p(a, o) { - i = a; + r = a; }, d(a) { - a && ke(e), n = !1, r(); + a && ke(e), n = !1, i(); } }; } -function vD(i) { +function vD(r) { let e = ( /*entry*/ - (i[62].audio.orig_name || "Audio") + "" + (r[62].audio.orig_name || "Audio") + "" ), t; return { c() { @@ -44888,11 +44888,11 @@ function vD(i) { l(n) { t = so(n, e); }, - m(n, r) { - Ye(n, t, r); + m(n, i) { + Ye(n, t, i); }, - p(n, r) { - r[0] & /*resolved_value*/ + p(n, i) { + i[0] & /*resolved_value*/ 4194304 && e !== (e = /*entry*/ (n[62].audio.orig_name || "Audio") + "") && ao(t, e); }, @@ -44901,10 +44901,10 @@ function vD(i) { } }; } -function yD(i) { +function yD(r) { let e = ( /*entry*/ - (i[62].video.orig_name || "Video") + "" + (r[62].video.orig_name || "Video") + "" ), t; return { c() { @@ -44913,11 +44913,11 @@ function yD(i) { l(n) { t = so(n, e); }, - m(n, r) { - Ye(n, t, r); + m(n, i) { + Ye(n, t, i); }, - p(n, r) { - r[0] & /*resolved_value*/ + p(n, i) { + i[0] & /*resolved_value*/ 4194304 && e !== (e = /*entry*/ (n[62].video.orig_name || "Video") + "") && ao(t, e); }, @@ -44926,10 +44926,10 @@ function yD(i) { } }; } -function bD(i) { +function bD(r) { let e = ( /*entry*/ - (i[62].image.orig_name || "Image") + "" + (r[62].image.orig_name || "Image") + "" ), t; return { c() { @@ -44938,11 +44938,11 @@ function bD(i) { l(n) { t = so(n, e); }, - m(n, r) { - Ye(n, t, r); + m(n, i) { + Ye(n, t, i); }, - p(n, r) { - r[0] & /*resolved_value*/ + p(n, i) { + i[0] & /*resolved_value*/ 4194304 && e !== (e = /*entry*/ (n[62].image.orig_name || "Image") + "") && ao(t, e); }, @@ -44951,8 +44951,8 @@ function bD(i) { } }; } -function _g(i) { - let e, t, n, r, s, a, o, l, u, c, h, d; +function _g(r) { + let e, t, n, i, s, a, o, l, u, c, h, d; const f = [_D, pD, gD], m = []; function g(A, w) { return "image" in /*entry*/ @@ -44960,19 +44960,19 @@ function _g(i) { A[62] ? 1 : "audio" in /*entry*/ A[62] ? 2 : -1; } - ~(n = g(i)) && (r = m[n] = f[n](i)); + ~(n = g(r)) && (i = m[n] = f[n](r)); function p() { return ( /*click_handler_4*/ - i[52]( + r[52]( /*i*/ - i[64] + r[64] ) ); } let b = ( /*interactive*/ - i[12] && pg(i) + r[12] && pg(r) ); function y(A, w) { if ("image" in /*entry*/ @@ -44982,162 +44982,162 @@ function _g(i) { if ("audio" in /*entry*/ A[62]) return vD; } - let v = y(i), T = v && v(i); + let v = y(r), T = v && v(r); return { c() { - e = ot("div"), t = ot("button"), r && r.c(), a = It(), b && b.c(), o = It(), l = ot("div"), T && T.c(), u = It(), this.h(); + e = ot("div"), t = ot("button"), i && i.c(), a = It(), b && b.c(), o = It(), l = ot("div"), T && T.c(), u = It(), this.h(); }, l(A) { e = at(A, "DIV", { class: !0 }); var w = an(e); t = at(w, "BUTTON", { class: !0, "aria-label": !0 }); var D = an(t); - r && r.l(D), D.forEach(ke), a = kt(w), b && b.l(w), o = kt(w), l = at(w, "DIV", { class: !0 }); + i && i.l(D), D.forEach(ke), a = kt(w), b && b.l(w), o = kt(w), l = at(w, "DIV", { class: !0 }); var L = an(l); T && T.l(L), L.forEach(ke), u = kt(w), w.forEach(ke), this.h(); }, h() { - Ue(t, "class", "thumbnail-item thumbnail-lg svelte-11ssfn7"), Ue(t, "aria-label", s = "Thumbnail " + /*i*/ - (i[64] + 1) + " of " + /*resolved_value*/ - i[22].length), Sn( + Ue(t, "class", "thumbnail-item thumbnail-lg svelte-5rws6s"), Ue(t, "aria-label", s = "Thumbnail " + /*i*/ + (r[64] + 1) + " of " + /*resolved_value*/ + r[22].length), Sn( t, "selected", /*selected_index*/ - i[1] === /*i*/ - i[64] - ), Ue(l, "class", "filename-label svelte-11ssfn7"), Ue(e, "class", "thumbnail-wrapper svelte-11ssfn7"); + r[1] === /*i*/ + r[64] + ), Ue(l, "class", "filename-label svelte-5rws6s"), Ue(e, "class", "thumbnail-wrapper svelte-5rws6s"); }, m(A, w) { Ye(A, e, w), yt(e, t), ~n && m[n].m(t, null), yt(e, a), b && b.m(e, null), yt(e, o), yt(e, l), T && T.m(l, null), yt(e, u), c = !0, h || (d = Js(t, "click", p), h = !0); }, p(A, w) { - i = A; + r = A; let D = n; - n = g(i), n === D ? ~n && m[n].p(i, w) : (r && (Pn(), Re(m[D], 1, 1, () => { + n = g(r), n === D ? ~n && m[n].p(r, w) : (i && (Pn(), Re(m[D], 1, 1, () => { m[D] = null; - }), Fn()), ~n ? (r = m[n], r ? r.p(i, w) : (r = m[n] = f[n](i), r.c()), Ee(r, 1), r.m(t, null)) : r = null), (!c || w[0] & /*resolved_value*/ + }), Fn()), ~n ? (i = m[n], i ? i.p(r, w) : (i = m[n] = f[n](r), i.c()), Ee(i, 1), i.m(t, null)) : i = null), (!c || w[0] & /*resolved_value*/ 4194304 && s !== (s = "Thumbnail " + /*i*/ - (i[64] + 1) + " of " + /*resolved_value*/ - i[22].length)) && Ue(t, "aria-label", s), (!c || w[0] & /*selected_index*/ + (r[64] + 1) + " of " + /*resolved_value*/ + r[22].length)) && Ue(t, "aria-label", s), (!c || w[0] & /*selected_index*/ 2) && Sn( t, "selected", /*selected_index*/ - i[1] === /*i*/ - i[64] + r[1] === /*i*/ + r[64] ), /*interactive*/ - i[12] ? b ? b.p(i, w) : (b = pg(i), b.c(), b.m(e, o)) : b && (b.d(1), b = null), v === (v = y(i)) && T ? T.p(i, w) : (T && T.d(1), T = v && v(i), T && (T.c(), T.m(l, null))); + r[12] ? b ? b.p(r, w) : (b = pg(r), b.c(), b.m(e, o)) : b && (b.d(1), b = null), v === (v = y(r)) && T ? T.p(r, w) : (T && T.d(1), T = v && v(r), T && (T.c(), T.m(l, null))); }, i(A) { - c || (Ee(r), c = !0); + c || (Ee(i), c = !0); }, o(A) { - Re(r), c = !1; + Re(i), c = !1; }, d(A) { A && ke(e), ~n && m[n].d(), b && b.d(), T && T.d(), h = !1, d(); } }; } -function vg(i) { +function vg(r) { let e, t, n; return t = new Nh({ props: { filetype: ( /*file_types*/ - i[18] + r[18] ), file_count: "multiple", max_file_size: ( /*max_file_size*/ - i[19] + r[19] ), root: ( /*root*/ - i[17] + r[17] ), upload: ( /*upload*/ - i[20] + r[20] ), stream_handler: ( /*stream_handler*/ - i[21] + r[21] ), $$slots: { default: [ED] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }), t.$on( "load", /*load_handler*/ - i[54] + r[54] ), t.$on( "error", /*error_handler_1*/ - i[55] + r[55] ), { c() { e = ot("div"), Xt(t.$$.fragment), this.h(); }, - l(r) { - e = at(r, "DIV", { class: !0 }); + l(i) { + e = at(i, "DIV", { class: !0 }); var s = an(e); Yt(t.$$.fragment, s), s.forEach(ke), this.h(); }, h() { - Ue(e, "class", "add-media-bar svelte-11ssfn7"); + Ue(e, "class", "add-media-bar svelte-5rws6s"); }, - m(r, s) { - Ye(r, e, s), Zt(t, e, null), n = !0; + m(i, s) { + Ye(i, e, s), Zt(t, e, null), n = !0; }, - p(r, s) { + p(i, s) { const a = {}; s[0] & /*file_types*/ 262144 && (a.filetype = /*file_types*/ - r[18]), s[0] & /*max_file_size*/ + i[18]), s[0] & /*max_file_size*/ 524288 && (a.max_file_size = /*max_file_size*/ - r[19]), s[0] & /*root*/ + i[19]), s[0] & /*root*/ 131072 && (a.root = /*root*/ - r[17]), s[0] & /*upload*/ + i[17]), s[0] & /*upload*/ 1048576 && (a.upload = /*upload*/ - r[20]), s[0] & /*stream_handler*/ + i[20]), s[0] & /*stream_handler*/ 2097152 && (a.stream_handler = /*stream_handler*/ - r[21]), s[2] & /*$$scope*/ - 32 && (a.$$scope = { dirty: s, ctx: r }), t.$set(a); + i[21]), s[2] & /*$$scope*/ + 32 && (a.$$scope = { dirty: s, ctx: i }), t.$set(a); }, - i(r) { - n || (Ee(t.$$.fragment, r), n = !0); + i(i) { + n || (Ee(t.$$.fragment, i), n = !0); }, - o(r) { - Re(t.$$.fragment, r), n = !1; + o(i) { + Re(t.$$.fragment, i), n = !1; }, - d(r) { - r && ke(e), Qt(t); + d(i) { + i && ke(e), Qt(t); } }; } -function ED(i) { - let e, t = ' Add Media'; +function ED(r) { + let e, t = ' Add Media'; return { c() { e = ot("div"), e.innerHTML = t, this.h(); }, l(n) { - e = at(n, "DIV", { class: !0, "data-svelte-h": !0 }), Lr(e) !== "svelte-ywxv2d" && (e.innerHTML = t), this.h(); + e = at(n, "DIV", { class: !0, "data-svelte-h": !0 }), Li(e) !== "svelte-ywxv2d" && (e.innerHTML = t), this.h(); }, h() { - Ue(e, "class", "add-media-btn svelte-11ssfn7"); + Ue(e, "class", "add-media-btn svelte-5rws6s"); }, - m(n, r) { - Ye(n, e, r); + m(n, i) { + Ye(n, e, i); }, - p: $i, + p: $r, d(n) { n && ke(e); } }; } -function SD(i) { +function SD(r) { let e, t; return e = new b_({}), { c() { @@ -45146,8 +45146,8 @@ function SD(i) { l(n) { Yt(e.$$.fragment, n); }, - m(n, r) { - Zt(e, n, r), t = !0; + m(n, i) { + Zt(e, n, i), t = !0; }, i(n) { t || (Ee(e.$$.fragment, n), t = !0); @@ -45160,15 +45160,15 @@ function SD(i) { } }; } -function TD(i) { - let e, t, n, r, s, a, o; - Xw( +function TD(r) { + let e, t, n, i, s, a, o; + X9( /*onwindowresize*/ - i[42] + r[42] ); let l = ( /*show_label*/ - i[2] && lg(i) + r[2] && lg(r) ); const u = [oD, aD], c = []; function h(d, f) { @@ -45179,19 +45179,19 @@ function TD(i) { d[22].length === 0 ? 0 : 1 ); } - return t = h(i), n = c[t] = u[t](i), { + return t = h(r), n = c[t] = u[t](r), { c() { - l && l.c(), e = It(), n.c(), r = Yl(); + l && l.c(), e = It(), n.c(), i = Yl(); }, l(d) { - l && l.l(d), e = kt(d), n.l(d), r = Yl(); + l && l.l(d), e = kt(d), n.l(d), i = Yl(); }, m(d, f) { - l && l.m(d, f), Ye(d, e, f), c[t].m(d, f), Ye(d, r, f), s = !0, a || (o = Js( + l && l.m(d, f), Ye(d, e, f), c[t].m(d, f), Ye(d, i, f), s = !0, a || (o = Js( s4, "resize", /*onwindowresize*/ - i[42] + r[42] ), a = !0); }, p(d, f) { @@ -45203,7 +45203,7 @@ function TD(i) { let m = t; t = h(d), t === m ? c[t].p(d, f) : (Pn(), Re(c[m], 1, 1, () => { c[m] = null; - }), Fn(), n = c[t], n ? n.p(d, f) : (n = c[t] = u[t](d), n.c()), Ee(n, 1), n.m(r.parentNode, r)); + }), Fn(), n = c[t], n ? n.p(d, f) : (n = c[t] = u[t](d), n.c()), Ee(n, 1), n.m(i.parentNode, i)); }, i(d) { s || (Ee(l), Ee(n), s = !0); @@ -45212,12 +45212,12 @@ function TD(i) { Re(l), Re(n), s = !1; }, d(d) { - d && (ke(e), ke(r)), l && l.d(d), c[t].d(d), a = !1, o(); + d && (ke(e), ke(i)), l && l.d(d), c[t].d(d), a = !1, o(); } }; } -function AD(i, e, t) { - let n, r, s; +function AD(r, e, t) { + let n, i, s; var a = this && this.__awaiter || function(ee, St, nt, Hn) { function xn(Jt) { return Jt instanceof nt ? Jt : new nt(function(Bt) { @@ -45225,34 +45225,34 @@ function AD(i, e, t) { }); } return new (nt || (nt = Promise))(function(Jt, Bt) { - function ii(Ki) { + function rr(Kr) { try { - Or(Hn.next(Ki)); - } catch (cr) { - Bt(cr); + Oi(Hn.next(Kr)); + } catch (ci) { + Bt(ci); } } - function aa(Ki) { + function aa(Kr) { try { - Or(Hn.throw(Ki)); - } catch (cr) { - Bt(cr); + Oi(Hn.throw(Kr)); + } catch (ci) { + Bt(ci); } } - function Or(Ki) { - Ki.done ? Jt(Ki.value) : xn(Ki.value).then(ii, aa); + function Oi(Kr) { + Kr.done ? Jt(Kr.value) : xn(Kr.value).then(rr, aa); } - Or((Hn = Hn.apply(ee, St || [])).next()); + Oi((Hn = Hn.apply(ee, St || [])).next()); }); }, o, l, u; let { show_label: c = !0 } = e, { label: h } = e, { value: d = null } = e, { columns: f = [2] } = e, { rows: m = void 0 } = e, { height: g = "auto" } = e, { preview: p } = e, { allow_preview: b = !0 } = e, { object_fit: y = "cover" } = e, { show_share_button: v = !1 } = e, { show_download_button: T = !1 } = e, { i18n: A } = e, { selected_index: w = null } = e, { interactive: D } = e, { _fetch: L } = e, { mode: I = "normal" } = e, { show_fullscreen_button: R = !0 } = e, { display_icon_button_wrapper_top_corner: M = !1 } = e, { fullscreen: P = !1 } = e, { root: V = "" } = e, { file_types: U = ["image", "video", "audio"] } = e, { max_file_size: J = null } = e, { upload: Y = void 0 } = e, { stream_handler: X = void 0 } = e, $ = !1, Z; - const ne = iD(); + const ne = rD(); let B = !0, q = null, se = d; w == null && p && (d != null && d.length) && (w = 0); let he = w; function K(ee) { const St = ee.target, nt = ee.offsetX, xn = St.offsetWidth / 2; - nt < xn ? t(1, w = n) : t(1, w = r); + nt < xn ? t(1, w = n) : t(1, w = i); } function ge(ee) { switch (ee.code) { @@ -45263,7 +45263,7 @@ function AD(i, e, t) { ee.preventDefault(), t(1, w = n); break; case "ArrowRight": - ee.preventDefault(), t(1, w = r); + ee.preventDefault(), t(1, w = i); break; } } @@ -45273,9 +45273,9 @@ function AD(i, e, t) { var St; if (typeof ee != "number" || (yield sD(), xe[ee] === void 0)) return; (St = xe[ee]) === null || St === void 0 || St.focus(); - const { left: nt, width: Hn } = j.getBoundingClientRect(), { left: xn, width: Jt } = xe[ee].getBoundingClientRect(), ii = xn - nt + Jt / 2 - Hn / 2 + j.scrollLeft; + const { left: nt, width: Hn } = j.getBoundingClientRect(), { left: xn, width: Jt } = xe[ee].getBoundingClientRect(), rr = xn - nt + Jt / 2 - Hn / 2 + j.scrollLeft; j && typeof j.scrollTo == "function" && j.scrollTo({ - left: ii < 0 ? 0 : ii, + left: rr < 0 ? 0 : rr, behavior: "smooth" }); }); @@ -45301,27 +45301,27 @@ function AD(i, e, t) { function qe() { j && t(28, Rt = j.scrollWidth > j.clientWidth); } - rD(() => (qe(), document.addEventListener("fullscreenchange", () => { + iD(() => (qe(), document.addEventListener("fullscreenchange", () => { t(24, $ = !!document.fullscreenElement); }), window.addEventListener("resize", qe), () => window.removeEventListener("resize", qe))); function bt() { t(27, ye = s4.innerHeight); } const Ht = () => { - const ee = i4(s); + const ee = r4(s); if (ee == null) return; const { url: St, orig_name: nt } = ee; St && Ie(St, nt ?? "media"); }; function W(ee) { - tc.call(this, i, ee); + tc.call(this, r, ee); } function Fe(ee) { - tc.call(this, i, ee); + tc.call(this, r, ee); } function pe(ee) { - tc.call(this, i, ee); + tc.call(this, r, ee); } const Me = () => { t(1, w = null), ne("preview_close"); @@ -45332,7 +45332,7 @@ function AD(i, e, t) { }); } const Gt = (ee) => t(1, w = ee); - function ur(ee) { + function ui(ee) { ec[ee ? "unshift" : "push"](() => { j = ee, t(23, j); }); @@ -45342,35 +45342,35 @@ function AD(i, e, t) { }, _n = (ee) => { d && (t(0, d = d.filter((St, nt) => nt !== ee)), w !== null && w >= ee && t(1, w = w > 0 ? w - 1 : null), ne("change")); }, gt = (ee) => ne("upload", ee.detail), Ft = (ee) => ne("error", ee.detail); - function Mr(ee) { + function Mi(ee) { ec[ee ? "unshift" : "push"](() => { Z = ee, t(25, Z); }); } - return i.$$set = (ee) => { + return r.$$set = (ee) => { "show_label" in ee && t(2, c = ee.show_label), "label" in ee && t(3, h = ee.label), "value" in ee && t(0, d = ee.value), "columns" in ee && t(4, f = ee.columns), "rows" in ee && t(5, m = ee.rows), "height" in ee && t(6, g = ee.height), "preview" in ee && t(34, p = ee.preview), "allow_preview" in ee && t(7, b = ee.allow_preview), "object_fit" in ee && t(8, y = ee.object_fit), "show_share_button" in ee && t(9, v = ee.show_share_button), "show_download_button" in ee && t(10, T = ee.show_download_button), "i18n" in ee && t(11, A = ee.i18n), "selected_index" in ee && t(1, w = ee.selected_index), "interactive" in ee && t(12, D = ee.interactive), "_fetch" in ee && t(35, L = ee._fetch), "mode" in ee && t(13, I = ee.mode), "show_fullscreen_button" in ee && t(14, R = ee.show_fullscreen_button), "display_icon_button_wrapper_top_corner" in ee && t(15, M = ee.display_icon_button_wrapper_top_corner), "fullscreen" in ee && t(16, P = ee.fullscreen), "root" in ee && t(17, V = ee.root), "file_types" in ee && t(18, U = ee.file_types), "max_file_size" in ee && t(19, J = ee.max_file_size), "upload" in ee && t(20, Y = ee.upload), "stream_handler" in ee && t(21, X = ee.stream_handler); - }, i.$$.update = () => { - i.$$.dirty[0] & /*value*/ - 1 | i.$$.dirty[1] & /*was_reset*/ - 256 && t(39, B = d == null || d.length === 0 ? !0 : B), i.$$.dirty[0] & /*value*/ - 1 && t(22, q = d == null ? null : d.map((ee) => "video" in ee ? { video: ee.video, caption: ee.caption } : "audio" in ee ? { audio: ee.audio, caption: ee.caption } : "image" in ee ? { image: ee.image, caption: ee.caption } : {})), i.$$.dirty[0] & /*value, selected_index*/ - 3 | i.$$.dirty[1] & /*prev_value, was_reset, preview*/ + }, r.$$.update = () => { + r.$$.dirty[0] & /*value*/ + 1 | r.$$.dirty[1] & /*was_reset*/ + 256 && t(39, B = d == null || d.length === 0 ? !0 : B), r.$$.dirty[0] & /*value*/ + 1 && t(22, q = d == null ? null : d.map((ee) => "video" in ee ? { video: ee.video, caption: ee.caption } : "audio" in ee ? { audio: ee.audio, caption: ee.caption } : "image" in ee ? { image: ee.image, caption: ee.caption } : {})), r.$$.dirty[0] & /*value, selected_index*/ + 3 | r.$$.dirty[1] & /*prev_value, was_reset, preview*/ 776 && (Fa(se, d) || (B ? (t(1, w = p && (d != null && d.length) ? 0 : null), t(39, B = !1)) : w !== null && d !== null ? t( 1, w = Math.max(0, Math.min(w, d.length - 1)) - ) : t(1, w = null), ne("change"), t(40, se = d))), i.$$.dirty[0] & /*selected_index, resolved_value*/ - 4194306 | i.$$.dirty[1] & /*old_selected_index*/ + ) : t(1, w = null), ne("change"), t(40, se = d))), r.$$.dirty[0] & /*selected_index, resolved_value*/ + 4194306 | r.$$.dirty[1] & /*old_selected_index*/ 1024 && w !== he && (t(41, he = w), w !== null && (q != null && t(1, w = Math.max(0, Math.min(w, q.length - 1))), ne("select", { index: w, value: q == null ? void 0 : q[w] - }))), i.$$.dirty[0] & /*selected_index, resolved_value*/ - 4194306 | i.$$.dirty[1] & /*_a, _b*/ - 96 && (n = ((w ?? 0) + (t(36, o = q == null ? void 0 : q.length) !== null && o !== void 0 ? o : 0) - 1) % (t(37, l = q == null ? void 0 : q.length) !== null && l !== void 0 ? l : 0)), i.$$.dirty[0] & /*selected_index, resolved_value*/ - 4194306 | i.$$.dirty[1] & /*_c*/ - 128 && (r = ((w ?? 0) + 1) % (t(38, u = q == null ? void 0 : q.length) !== null && u !== void 0 ? u : 0)), i.$$.dirty[0] & /*allow_preview, selected_index*/ - 130 && b && me(w), i.$$.dirty[0] & /*selected_index, resolved_value*/ - 4194306 && t(29, s = w != null && q != null ? q[w] : null), i.$$.dirty[0] & /*resolved_value*/ - 4194304 && qe(), i.$$.dirty[0] & /*container_element*/ + }))), r.$$.dirty[0] & /*selected_index, resolved_value*/ + 4194306 | r.$$.dirty[1] & /*_a, _b*/ + 96 && (n = ((w ?? 0) + (t(36, o = q == null ? void 0 : q.length) !== null && o !== void 0 ? o : 0) - 1) % (t(37, l = q == null ? void 0 : q.length) !== null && l !== void 0 ? l : 0)), r.$$.dirty[0] & /*selected_index, resolved_value*/ + 4194306 | r.$$.dirty[1] & /*_c*/ + 128 && (i = ((w ?? 0) + 1) % (t(38, u = q == null ? void 0 : q.length) !== null && u !== void 0 ? u : 0)), r.$$.dirty[0] & /*allow_preview, selected_index*/ + 130 && b && me(w), r.$$.dirty[0] & /*selected_index, resolved_value*/ + 4194306 && t(29, s = w != null && q != null ? q[w] : null), r.$$.dirty[0] & /*resolved_value*/ + 4194304 && qe(), r.$$.dirty[0] & /*container_element*/ 8388608 && j && qe(); }, [ d, @@ -45424,17 +45424,17 @@ function AD(i, e, t) { Et, Ct, Gt, - ur, + ui, Un, _n, gt, Ft, - Mr + Mi ]; } -class xD extends Yw { +class xD extends Y9 { constructor(e) { - super(), Zw( + super(), Z9( this, e, AD, @@ -45471,20 +45471,20 @@ class xD extends Yw { ); } } -function Os(i) { +function Os(r) { let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0; - for (; i > 1e3 && t < e.length - 1; ) - i /= 1e3, t++; + for (; r > 1e3 && t < e.length - 1; ) + r /= 1e3, t++; let n = e[t]; - return (Number.isInteger(i) ? i : i.toFixed(1)) + n; + return (Number.isInteger(r) ? r : r.toFixed(1)) + n; } const { SvelteComponent: wD, - append_hydration: li, + append_hydration: lr, attr: He, children: zn, claim_element: DD, - claim_svg_element: ui, + claim_svg_element: ur, component_subscribe: yg, detach: wn, element: kD, @@ -45493,65 +45493,65 @@ const { noop: bg, safe_not_equal: RD, set_style: Zo, - svg_element: ci, + svg_element: cr, toggle_class: Eg } = window.__gradio__svelte__internal, { onMount: CD } = window.__gradio__svelte__internal; -function FD(i) { - let e, t, n, r, s, a, o, l, u, c, h, d; +function FD(r) { + let e, t, n, i, s, a, o, l, u, c, h, d; return { c() { - e = kD("div"), t = ci("svg"), n = ci("g"), r = ci("path"), s = ci("path"), a = ci("path"), o = ci("path"), l = ci("g"), u = ci("path"), c = ci("path"), h = ci("path"), d = ci("path"), this.h(); + e = kD("div"), t = cr("svg"), n = cr("g"), i = cr("path"), s = cr("path"), a = cr("path"), o = cr("path"), l = cr("g"), u = cr("path"), c = cr("path"), h = cr("path"), d = cr("path"), this.h(); }, l(f) { e = DD(f, "DIV", { class: !0 }); var m = zn(e); - t = ui(m, "svg", { + t = ur(m, "svg", { viewBox: !0, fill: !0, xmlns: !0, class: !0 }); var g = zn(t); - n = ui(g, "g", { style: !0 }); + n = ur(g, "g", { style: !0 }); var p = zn(n); - r = ui(p, "path", { + i = ur(p, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), zn(r).forEach(wn), s = ui(p, "path", { d: !0, fill: !0, class: !0 }), zn(s).forEach(wn), a = ui(p, "path", { + }), zn(i).forEach(wn), s = ur(p, "path", { d: !0, fill: !0, class: !0 }), zn(s).forEach(wn), a = ur(p, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), zn(a).forEach(wn), o = ui(p, "path", { d: !0, fill: !0, class: !0 }), zn(o).forEach(wn), p.forEach(wn), l = ui(g, "g", { style: !0 }); + }), zn(a).forEach(wn), o = ur(p, "path", { d: !0, fill: !0, class: !0 }), zn(o).forEach(wn), p.forEach(wn), l = ur(g, "g", { style: !0 }); var b = zn(l); - u = ui(b, "path", { + u = ur(b, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), zn(u).forEach(wn), c = ui(b, "path", { d: !0, fill: !0, class: !0 }), zn(c).forEach(wn), h = ui(b, "path", { + }), zn(u).forEach(wn), c = ur(b, "path", { d: !0, fill: !0, class: !0 }), zn(c).forEach(wn), h = ur(b, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), zn(h).forEach(wn), d = ui(b, "path", { d: !0, fill: !0, class: !0 }), zn(d).forEach(wn), b.forEach(wn), g.forEach(wn), m.forEach(wn), this.h(); + }), zn(h).forEach(wn), d = ur(b, "path", { d: !0, fill: !0, class: !0 }), zn(d).forEach(wn), b.forEach(wn), g.forEach(wn), m.forEach(wn), this.h(); }, h() { - He(r, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), He(r, "fill", "#FF7C00"), He(r, "fill-opacity", "0.4"), He(r, "class", "svelte-43sxxs"), He(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), He(s, "fill", "#FF7C00"), He(s, "class", "svelte-43sxxs"), He(a, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), He(a, "fill", "#FF7C00"), He(a, "fill-opacity", "0.4"), He(a, "class", "svelte-43sxxs"), He(o, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), He(o, "fill", "#FF7C00"), He(o, "class", "svelte-43sxxs"), Zo(n, "transform", "translate(" + /*$top*/ - i[1][0] + "px, " + /*$top*/ - i[1][1] + "px)"), He(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), He(u, "fill", "#FF7C00"), He(u, "fill-opacity", "0.4"), He(u, "class", "svelte-43sxxs"), He(c, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), He(c, "fill", "#FF7C00"), He(c, "class", "svelte-43sxxs"), He(h, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), He(h, "fill", "#FF7C00"), He(h, "fill-opacity", "0.4"), He(h, "class", "svelte-43sxxs"), He(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), He(d, "fill", "#FF7C00"), He(d, "class", "svelte-43sxxs"), Zo(l, "transform", "translate(" + /*$bottom*/ - i[2][0] + "px, " + /*$bottom*/ - i[2][1] + "px)"), He(t, "viewBox", "-1200 -1200 3000 3000"), He(t, "fill", "none"), He(t, "xmlns", "http://www.w3.org/2000/svg"), He(t, "class", "svelte-43sxxs"), He(e, "class", "svelte-43sxxs"), Eg( + He(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), He(i, "fill", "#FF7C00"), He(i, "fill-opacity", "0.4"), He(i, "class", "svelte-43sxxs"), He(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), He(s, "fill", "#FF7C00"), He(s, "class", "svelte-43sxxs"), He(a, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), He(a, "fill", "#FF7C00"), He(a, "fill-opacity", "0.4"), He(a, "class", "svelte-43sxxs"), He(o, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), He(o, "fill", "#FF7C00"), He(o, "class", "svelte-43sxxs"), Zo(n, "transform", "translate(" + /*$top*/ + r[1][0] + "px, " + /*$top*/ + r[1][1] + "px)"), He(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), He(u, "fill", "#FF7C00"), He(u, "fill-opacity", "0.4"), He(u, "class", "svelte-43sxxs"), He(c, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), He(c, "fill", "#FF7C00"), He(c, "class", "svelte-43sxxs"), He(h, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), He(h, "fill", "#FF7C00"), He(h, "fill-opacity", "0.4"), He(h, "class", "svelte-43sxxs"), He(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), He(d, "fill", "#FF7C00"), He(d, "class", "svelte-43sxxs"), Zo(l, "transform", "translate(" + /*$bottom*/ + r[2][0] + "px, " + /*$bottom*/ + r[2][1] + "px)"), He(t, "viewBox", "-1200 -1200 3000 3000"), He(t, "fill", "none"), He(t, "xmlns", "http://www.w3.org/2000/svg"), He(t, "class", "svelte-43sxxs"), He(e, "class", "svelte-43sxxs"), Eg( e, "margin", /*margin*/ - i[0] + r[0] ); }, m(f, m) { - LD(f, e, m), li(e, t), li(t, n), li(n, r), li(n, s), li(n, a), li(n, o), li(t, l), li(l, u), li(l, c), li(l, h), li(l, d); + LD(f, e, m), lr(e, t), lr(t, n), lr(n, i), lr(n, s), lr(n, a), lr(n, o), lr(t, l), lr(l, u), lr(l, c), lr(l, h), lr(l, d); }, p(f, [m]) { m & /*$top*/ @@ -45575,8 +45575,8 @@ function FD(i) { } }; } -function PD(i, e, t) { - let n, r; +function PD(r, e, t) { + let n, i; var s = this && this.__awaiter || function(f, m, g, p) { function b(y) { return y instanceof g ? y : new g(function(v) { @@ -45606,9 +45606,9 @@ function PD(i, e, t) { }; let { margin: a = !0 } = e; const o = om([0, 0]); - yg(i, o, (f) => t(1, n = f)); + yg(r, o, (f) => t(1, n = f)); const l = om([0, 0]); - yg(i, l, (f) => t(2, r = f)); + yg(r, l, (f) => t(2, i = f)); let u; function c() { return s(this, void 0, void 0, function* () { @@ -45625,9 +45625,9 @@ function PD(i, e, t) { yield Promise.all([o.set([125, 0]), l.set([-125, 0])]), h(); }); } - return CD(() => (d(), () => u = !0)), i.$$set = (f) => { + return CD(() => (d(), () => u = !0)), r.$$set = (f) => { "margin" in f && t(0, a = f.margin); - }, [a, n, r, o, l]; + }, [a, n, i, o, l]; } class MD extends wD { constructor(e) { @@ -45636,13 +45636,13 @@ class MD extends wD { } const { SvelteComponent: OD, - append_hydration: Xr, - attr: vi, + append_hydration: Xi, + attr: vr, binding_callbacks: Sg, check_outros: Zc, - children: Mi, + children: Mr, claim_component: a4, - claim_element: Oi, + claim_element: Or, claim_space: Wn, claim_text: ft, create_component: o4, @@ -45650,7 +45650,7 @@ const { destroy_component: u4, destroy_each: c4, detach: be, - element: Bi, + element: Br, empty: Jn, ensure_array_like: Ql, get_all_dirty_from_scope: h4, @@ -45661,68 +45661,68 @@ const { mount_component: f4, noop: eh, safe_not_equal: ND, - set_data: ei, - set_style: Sr, + set_data: er, + set_style: Si, space: Yn, text: mt, toggle_class: Vn, - transition_in: gi, - transition_out: Ni, + transition_in: gr, + transition_out: Nr, update_slot_base: m4 -} = window.__gradio__svelte__internal, { tick: $D } = window.__gradio__svelte__internal, { onDestroy: UD } = window.__gradio__svelte__internal, { createEventDispatcher: HD } = window.__gradio__svelte__internal, GD = (i) => ({}), Tg = (i) => ({}), zD = (i) => ({}), Ag = (i) => ({}); -function xg(i, e, t) { - const n = i.slice(); +} = window.__gradio__svelte__internal, { tick: $D } = window.__gradio__svelte__internal, { onDestroy: UD } = window.__gradio__svelte__internal, { createEventDispatcher: HD } = window.__gradio__svelte__internal, GD = (r) => ({}), Tg = (r) => ({}), zD = (r) => ({}), Ag = (r) => ({}); +function xg(r, e, t) { + const n = r.slice(); return n[40] = e[t], n[42] = t, n; } -function wg(i, e, t) { - const n = i.slice(); +function wg(r, e, t) { + const n = r.slice(); return n[40] = e[t], n; } -function qD(i) { - let e, t, n, r, s = ( +function qD(r) { + let e, t, n, i, s = ( /*i18n*/ - i[1]("common.error") + "" + r[1]("common.error") + "" ), a, o, l; - t = new Pr({ + t = new Pi({ props: { Icon: Ph, label: ( /*i18n*/ - i[1]("common.clear") + r[1]("common.clear") ), disabled: !1 } }), t.$on( "click", /*click_handler*/ - i[32] + r[32] ); const u = ( /*#slots*/ - i[30].error + r[30].error ), c = l4( u, - i, + r, /*$$scope*/ - i[29], + r[29], Tg ); return { c() { - e = Bi("div"), o4(t.$$.fragment), n = Yn(), r = Bi("span"), a = mt(s), o = Yn(), c && c.c(), this.h(); + e = Br("div"), o4(t.$$.fragment), n = Yn(), i = Br("span"), a = mt(s), o = Yn(), c && c.c(), this.h(); }, l(h) { - e = Oi(h, "DIV", { class: !0 }); - var d = Mi(e); - a4(t.$$.fragment, d), d.forEach(be), n = Wn(h), r = Oi(h, "SPAN", { class: !0 }); - var f = Mi(r); + e = Or(h, "DIV", { class: !0 }); + var d = Mr(e); + a4(t.$$.fragment, d), d.forEach(be), n = Wn(h), i = Or(h, "SPAN", { class: !0 }); + var f = Mr(i); a = ft(f, s), f.forEach(be), o = Wn(h), c && c.l(h), this.h(); }, h() { - vi(e, "class", "clear-status svelte-17v219f"), vi(r, "class", "error svelte-17v219f"); + vr(e, "class", "clear-status svelte-17v219f"), vr(i, "class", "error svelte-17v219f"); }, m(h, d) { - Le(h, e, d), f4(t, e, null), Le(h, n, d), Le(h, r, d), Xr(r, a), Le(h, o, d), c && c.m(h, d), l = !0; + Le(h, e, d), f4(t, e, null), Le(h, n, d), Le(h, i, d), Xi(i, a), Le(h, o, d), c && c.m(h, d), l = !0; }, p(h, d) { const f = {}; @@ -45730,7 +45730,7 @@ function qD(i) { 2 && (f.label = /*i18n*/ h[1]("common.clear")), t.$set(f), (!l || d[0] & /*i18n*/ 2) && s !== (s = /*i18n*/ - h[1]("common.error") + "") && ei(a, s), c && c.p && (!l || d[0] & /*$$scope*/ + h[1]("common.error") + "") && er(a, s), c && c.p && (!l || d[0] & /*$$scope*/ 536870912) && m4( c, u, @@ -45751,22 +45751,22 @@ function qD(i) { ); }, i(h) { - l || (gi(t.$$.fragment, h), gi(c, h), l = !0); + l || (gr(t.$$.fragment, h), gr(c, h), l = !0); }, o(h) { - Ni(t.$$.fragment, h), Ni(c, h), l = !1; + Nr(t.$$.fragment, h), Nr(c, h), l = !1; }, d(h) { - h && (be(e), be(n), be(r), be(o)), u4(t), c && c.d(h); + h && (be(e), be(n), be(i), be(o)), u4(t), c && c.d(h); } }; } -function VD(i) { - let e, t, n, r, s, a, o, l, u, c = ( +function VD(r) { + let e, t, n, i, s, a, o, l, u, c = ( /*variant*/ - i[8] === "default" && /*show_eta_bar*/ - i[18] && /*show_progress*/ - i[6] === "full" && Dg(i) + r[8] === "default" && /*show_eta_bar*/ + r[18] && /*show_progress*/ + r[6] === "full" && Dg(r) ); function h(v, T) { if ( @@ -45784,9 +45784,9 @@ function VD(i) { v[2] === 0 ) return KD; } - let d = h(i), f = d && d(i), m = ( + let d = h(r), f = d && d(r), m = ( /*timer*/ - i[5] && Lg(i) + r[5] && Lg(r) ); const g = [ZD, QD], p = []; function b(v, T) { @@ -45798,33 +45798,33 @@ function VD(i) { ) ); } - ~(s = b(i)) && (a = p[s] = g[s](i)); + ~(s = b(r)) && (a = p[s] = g[s](r)); let y = !/*timer*/ - i[5] && Bg(i); + r[5] && Bg(r); return { c() { - c && c.c(), e = Yn(), t = Bi("div"), f && f.c(), n = Yn(), m && m.c(), r = Yn(), a && a.c(), o = Yn(), y && y.c(), l = Jn(), this.h(); + c && c.c(), e = Yn(), t = Br("div"), f && f.c(), n = Yn(), m && m.c(), i = Yn(), a && a.c(), o = Yn(), y && y.c(), l = Jn(), this.h(); }, l(v) { - c && c.l(v), e = Wn(v), t = Oi(v, "DIV", { class: !0 }); - var T = Mi(t); - f && f.l(T), n = Wn(T), m && m.l(T), T.forEach(be), r = Wn(v), a && a.l(v), o = Wn(v), y && y.l(v), l = Jn(), this.h(); + c && c.l(v), e = Wn(v), t = Or(v, "DIV", { class: !0 }); + var T = Mr(t); + f && f.l(T), n = Wn(T), m && m.l(T), T.forEach(be), i = Wn(v), a && a.l(v), o = Wn(v), y && y.l(v), l = Jn(), this.h(); }, h() { - vi(t, "class", "progress-text svelte-17v219f"), Vn( + vr(t, "class", "progress-text svelte-17v219f"), Vn( t, "meta-text-center", /*variant*/ - i[8] === "center" + r[8] === "center" ), Vn( t, "meta-text", /*variant*/ - i[8] === "default" + r[8] === "default" ); }, m(v, T) { - c && c.m(v, T), Le(v, e, T), Le(v, t, T), f && f.m(t, null), Xr(t, n), m && m.m(t, null), Le(v, r, T), ~s && p[s].m(v, T), Le(v, o, T), y && y.m(v, T), Le(v, l, T), u = !0; + c && c.m(v, T), Le(v, e, T), Le(v, t, T), f && f.m(t, null), Xi(t, n), m && m.m(t, null), Le(v, i, T), ~s && p[s].m(v, T), Le(v, o, T), y && y.m(v, T), Le(v, l, T), u = !0; }, p(v, T) { /*variant*/ @@ -45845,52 +45845,52 @@ function VD(i) { v[8] === "default" ); let A = s; - s = b(v), s === A ? ~s && p[s].p(v, T) : (a && (Jc(), Ni(p[A], 1, 1, () => { + s = b(v), s === A ? ~s && p[s].p(v, T) : (a && (Jc(), Nr(p[A], 1, 1, () => { p[A] = null; - }), Zc()), ~s ? (a = p[s], a ? a.p(v, T) : (a = p[s] = g[s](v), a.c()), gi(a, 1), a.m(o.parentNode, o)) : a = null), /*timer*/ - v[5] ? y && (Jc(), Ni(y, 1, 1, () => { + }), Zc()), ~s ? (a = p[s], a ? a.p(v, T) : (a = p[s] = g[s](v), a.c()), gr(a, 1), a.m(o.parentNode, o)) : a = null), /*timer*/ + v[5] ? y && (Jc(), Nr(y, 1, 1, () => { y = null; }), Zc()) : y ? (y.p(v, T), T[0] & /*timer*/ - 32 && gi(y, 1)) : (y = Bg(v), y.c(), gi(y, 1), y.m(l.parentNode, l)); + 32 && gr(y, 1)) : (y = Bg(v), y.c(), gr(y, 1), y.m(l.parentNode, l)); }, i(v) { - u || (gi(a), gi(y), u = !0); + u || (gr(a), gr(y), u = !0); }, o(v) { - Ni(a), Ni(y), u = !1; + Nr(a), Nr(y), u = !1; }, d(v) { - v && (be(e), be(t), be(r), be(o), be(l)), c && c.d(v), f && f.d(), m && m.d(), ~s && p[s].d(v), y && y.d(v); + v && (be(e), be(t), be(i), be(o), be(l)), c && c.d(v), f && f.d(), m && m.d(), ~s && p[s].d(v), y && y.d(v); } }; } -function Dg(i) { +function Dg(r) { let e, t = `translateX(${/*eta_level*/ - (i[17] || 0) * 100 - 100}%)`; + (r[17] || 0) * 100 - 100}%)`; return { c() { - e = Bi("div"), this.h(); + e = Br("div"), this.h(); }, l(n) { - e = Oi(n, "DIV", { class: !0 }), Mi(e).forEach(be), this.h(); + e = Or(n, "DIV", { class: !0 }), Mr(e).forEach(be), this.h(); }, h() { - vi(e, "class", "eta-bar svelte-17v219f"), Sr(e, "transform", t); + vr(e, "class", "eta-bar svelte-17v219f"), Si(e, "transform", t); }, - m(n, r) { - Le(n, e, r); + m(n, i) { + Le(n, e, i); }, - p(n, r) { - r[0] & /*eta_level*/ + p(n, i) { + i[0] & /*eta_level*/ 131072 && t !== (t = `translateX(${/*eta_level*/ - (n[17] || 0) * 100 - 100}%)`) && Sr(e, "transform", t); + (n[17] || 0) * 100 - 100}%)`) && Si(e, "transform", t); }, d(n) { n && be(e); } }; } -function KD(i) { +function KD(r) { let e; return { c() { @@ -45908,76 +45908,76 @@ function KD(i) { } }; } -function jD(i) { +function jD(r) { let e, t = ( /*queue_position*/ - i[2] + 1 + "" - ), n, r, s, a; + r[2] + 1 + "" + ), n, i, s, a; return { c() { - e = mt("queue: "), n = mt(t), r = mt("/"), s = mt( + e = mt("queue: "), n = mt(t), i = mt("/"), s = mt( /*queue_size*/ - i[3] + r[3] ), a = mt(" |"); }, l(o) { - e = ft(o, "queue: "), n = ft(o, t), r = ft(o, "/"), s = ft( + e = ft(o, "queue: "), n = ft(o, t), i = ft(o, "/"), s = ft( o, /*queue_size*/ - i[3] + r[3] ), a = ft(o, " |"); }, m(o, l) { - Le(o, e, l), Le(o, n, l), Le(o, r, l), Le(o, s, l), Le(o, a, l); + Le(o, e, l), Le(o, n, l), Le(o, i, l), Le(o, s, l), Le(o, a, l); }, p(o, l) { l[0] & /*queue_position*/ 4 && t !== (t = /*queue_position*/ - o[2] + 1 + "") && ei(n, t), l[0] & /*queue_size*/ - 8 && ei( + o[2] + 1 + "") && er(n, t), l[0] & /*queue_size*/ + 8 && er( s, /*queue_size*/ o[3] ); }, d(o) { - o && (be(e), be(n), be(r), be(s), be(a)); + o && (be(e), be(n), be(i), be(s), be(a)); } }; } -function WD(i) { +function WD(r) { let e, t = Ql( /*progress*/ - i[7] + r[7] ), n = []; - for (let r = 0; r < t.length; r += 1) - n[r] = Ig(wg(i, t, r)); + for (let i = 0; i < t.length; i += 1) + n[i] = Ig(wg(r, t, i)); return { c() { - for (let r = 0; r < n.length; r += 1) - n[r].c(); + for (let i = 0; i < n.length; i += 1) + n[i].c(); e = Jn(); }, - l(r) { + l(i) { for (let s = 0; s < n.length; s += 1) - n[s].l(r); + n[s].l(i); e = Jn(); }, - m(r, s) { + m(i, s) { for (let a = 0; a < n.length; a += 1) - n[a] && n[a].m(r, s); - Le(r, e, s); + n[a] && n[a].m(i, s); + Le(i, e, s); }, - p(r, s) { + p(i, s) { if (s[0] & /*progress*/ 128) { t = Ql( /*progress*/ - r[7] + i[7] ); let a; for (a = 0; a < t.length; a += 1) { - const o = wg(r, t, a); + const o = wg(i, t, a); n[a] ? n[a].p(o, s) : (n[a] = Ig(o), n[a].c(), n[a].m(e.parentNode, e)); } for (; a < n.length; a += 1) @@ -45985,47 +45985,47 @@ function WD(i) { n.length = t.length; } }, - d(r) { - r && be(e), c4(n, r); + d(i) { + i && be(e), c4(n, i); } }; } -function kg(i) { +function kg(r) { let e, t = ( /*p*/ - i[40].unit + "" - ), n, r, s = " ", a; + r[40].unit + "" + ), n, i, s = " ", a; function o(c, h) { return ( /*p*/ c[40].length != null ? XD : YD ); } - let l = o(i), u = l(i); + let l = o(r), u = l(r); return { c() { - u.c(), e = Yn(), n = mt(t), r = mt(" | "), a = mt(s); + u.c(), e = Yn(), n = mt(t), i = mt(" | "), a = mt(s); }, l(c) { - u.l(c), e = Wn(c), n = ft(c, t), r = ft(c, " | "), a = ft(c, s); + u.l(c), e = Wn(c), n = ft(c, t), i = ft(c, " | "), a = ft(c, s); }, m(c, h) { - u.m(c, h), Le(c, e, h), Le(c, n, h), Le(c, r, h), Le(c, a, h); + u.m(c, h), Le(c, e, h), Le(c, n, h), Le(c, i, h), Le(c, a, h); }, p(c, h) { l === (l = o(c)) && u ? u.p(c, h) : (u.d(1), u = l(c), u && (u.c(), u.m(e.parentNode, e))), h[0] & /*progress*/ 128 && t !== (t = /*p*/ - c[40].unit + "") && ei(n, t); + c[40].unit + "") && er(n, t); }, d(c) { - c && (be(e), be(n), be(r), be(a)), u.d(c); + c && (be(e), be(n), be(i), be(a)), u.d(c); } }; } -function YD(i) { +function YD(r) { let e = Os( /*p*/ - i[40].index || 0 + r[40].index || 0 ) + "", t; return { c() { @@ -46034,35 +46034,35 @@ function YD(i) { l(n) { t = ft(n, e); }, - m(n, r) { - Le(n, t, r); + m(n, i) { + Le(n, t, i); }, - p(n, r) { - r[0] & /*progress*/ + p(n, i) { + i[0] & /*progress*/ 128 && e !== (e = Os( /*p*/ n[40].index || 0 - ) + "") && ei(t, e); + ) + "") && er(t, e); }, d(n) { n && be(t); } }; } -function XD(i) { +function XD(r) { let e = Os( /*p*/ - i[40].index || 0 - ) + "", t, n, r = Os( + r[40].index || 0 + ) + "", t, n, i = Os( /*p*/ - i[40].length + r[40].length ) + "", s; return { c() { - t = mt(e), n = mt("/"), s = mt(r); + t = mt(e), n = mt("/"), s = mt(i); }, l(a) { - t = ft(a, e), n = ft(a, "/"), s = ft(a, r); + t = ft(a, e), n = ft(a, "/"), s = ft(a, i); }, m(a, o) { Le(a, t, o), Le(a, n, o), Le(a, s, o); @@ -46072,21 +46072,21 @@ function XD(i) { 128 && e !== (e = Os( /*p*/ a[40].index || 0 - ) + "") && ei(t, e), o[0] & /*progress*/ - 128 && r !== (r = Os( + ) + "") && er(t, e), o[0] & /*progress*/ + 128 && i !== (i = Os( /*p*/ a[40].length - ) + "") && ei(s, r); + ) + "") && er(s, i); }, d(a) { a && (be(t), be(n), be(s)); } }; } -function Ig(i) { +function Ig(r) { let e, t = ( /*p*/ - i[40].index != null && kg(i) + r[40].index != null && kg(r) ); return { c() { @@ -46095,63 +46095,63 @@ function Ig(i) { l(n) { t && t.l(n), e = Jn(); }, - m(n, r) { - t && t.m(n, r), Le(n, e, r); + m(n, i) { + t && t.m(n, i), Le(n, e, i); }, - p(n, r) { + p(n, i) { /*p*/ - n[40].index != null ? t ? t.p(n, r) : (t = kg(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + n[40].index != null ? t ? t.p(n, i) : (t = kg(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { n && be(e), t && t.d(n); } }; } -function Lg(i) { +function Lg(r) { let e, t = ( /*eta*/ - i[0] ? `/${/*formatted_eta*/ - i[19]}` : "" - ), n, r; + r[0] ? `/${/*formatted_eta*/ + r[19]}` : "" + ), n, i; return { c() { e = mt( /*formatted_timer*/ - i[20] - ), n = mt(t), r = mt("s"); + r[20] + ), n = mt(t), i = mt("s"); }, l(s) { e = ft( s, /*formatted_timer*/ - i[20] - ), n = ft(s, t), r = ft(s, "s"); + r[20] + ), n = ft(s, t), i = ft(s, "s"); }, m(s, a) { - Le(s, e, a), Le(s, n, a), Le(s, r, a); + Le(s, e, a), Le(s, n, a), Le(s, i, a); }, p(s, a) { a[0] & /*formatted_timer*/ - 1048576 && ei( + 1048576 && er( e, /*formatted_timer*/ s[20] ), a[0] & /*eta, formatted_eta*/ 524289 && t !== (t = /*eta*/ s[0] ? `/${/*formatted_eta*/ - s[19]}` : "") && ei(n, t); + s[19]}` : "") && er(n, t); }, d(s) { - s && (be(e), be(n), be(r)); + s && (be(e), be(n), be(i)); } }; } -function QD(i) { +function QD(r) { let e, t; return e = new MD({ props: { margin: ( /*variant*/ - i[8] === "default" + r[8] === "default" ) } }), { c() { @@ -46160,97 +46160,97 @@ function QD(i) { l(n) { a4(e.$$.fragment, n); }, - m(n, r) { - f4(e, n, r), t = !0; + m(n, i) { + f4(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*variant*/ + i[0] & /*variant*/ 256 && (s.margin = /*variant*/ n[8] === "default"), e.$set(s); }, i(n) { - t || (gi(e.$$.fragment, n), t = !0); + t || (gr(e.$$.fragment, n), t = !0); }, o(n) { - Ni(e.$$.fragment, n), t = !1; + Nr(e.$$.fragment, n), t = !1; }, d(n) { u4(e, n); } }; } -function ZD(i) { - let e, t, n, r, s, a = `${/*last_progress_level*/ - i[15] * 100}%`, o = ( +function ZD(r) { + let e, t, n, i, s, a = `${/*last_progress_level*/ + r[15] * 100}%`, o = ( /*progress*/ - i[7] != null && Rg(i) + r[7] != null && Rg(r) ); return { c() { - e = Bi("div"), t = Bi("div"), o && o.c(), n = Yn(), r = Bi("div"), s = Bi("div"), this.h(); + e = Br("div"), t = Br("div"), o && o.c(), n = Yn(), i = Br("div"), s = Br("div"), this.h(); }, l(l) { - e = Oi(l, "DIV", { class: !0 }); - var u = Mi(e); - t = Oi(u, "DIV", { class: !0 }); - var c = Mi(t); - o && o.l(c), c.forEach(be), n = Wn(u), r = Oi(u, "DIV", { class: !0 }); - var h = Mi(r); - s = Oi(h, "DIV", { class: !0 }), Mi(s).forEach(be), h.forEach(be), u.forEach(be), this.h(); + e = Or(l, "DIV", { class: !0 }); + var u = Mr(e); + t = Or(u, "DIV", { class: !0 }); + var c = Mr(t); + o && o.l(c), c.forEach(be), n = Wn(u), i = Or(u, "DIV", { class: !0 }); + var h = Mr(i); + s = Or(h, "DIV", { class: !0 }), Mr(s).forEach(be), h.forEach(be), u.forEach(be), this.h(); }, h() { - vi(t, "class", "progress-level-inner svelte-17v219f"), vi(s, "class", "progress-bar svelte-17v219f"), Sr(s, "width", a), vi(r, "class", "progress-bar-wrap svelte-17v219f"), vi(e, "class", "progress-level svelte-17v219f"); + vr(t, "class", "progress-level-inner svelte-17v219f"), vr(s, "class", "progress-bar svelte-17v219f"), Si(s, "width", a), vr(i, "class", "progress-bar-wrap svelte-17v219f"), vr(e, "class", "progress-level svelte-17v219f"); }, m(l, u) { - Le(l, e, u), Xr(e, t), o && o.m(t, null), Xr(e, n), Xr(e, r), Xr(r, s), i[31](s); + Le(l, e, u), Xi(e, t), o && o.m(t, null), Xi(e, n), Xi(e, i), Xi(i, s), r[31](s); }, p(l, u) { /*progress*/ l[7] != null ? o ? o.p(l, u) : (o = Rg(l), o.c(), o.m(t, null)) : o && (o.d(1), o = null), u[0] & /*last_progress_level*/ 32768 && a !== (a = `${/*last_progress_level*/ - l[15] * 100}%`) && Sr(s, "width", a); + l[15] * 100}%`) && Si(s, "width", a); }, i: eh, o: eh, d(l) { - l && be(e), o && o.d(), i[31](null); + l && be(e), o && o.d(), r[31](null); } }; } -function Rg(i) { +function Rg(r) { let e, t = Ql( /*progress*/ - i[7] + r[7] ), n = []; - for (let r = 0; r < t.length; r += 1) - n[r] = Og(xg(i, t, r)); + for (let i = 0; i < t.length; i += 1) + n[i] = Og(xg(r, t, i)); return { c() { - for (let r = 0; r < n.length; r += 1) - n[r].c(); + for (let i = 0; i < n.length; i += 1) + n[i].c(); e = Jn(); }, - l(r) { + l(i) { for (let s = 0; s < n.length; s += 1) - n[s].l(r); + n[s].l(i); e = Jn(); }, - m(r, s) { + m(i, s) { for (let a = 0; a < n.length; a += 1) - n[a] && n[a].m(r, s); - Le(r, e, s); + n[a] && n[a].m(i, s); + Le(i, e, s); }, - p(r, s) { + p(i, s) { if (s[0] & /*progress_level, progress*/ 16512) { t = Ql( /*progress*/ - r[7] + i[7] ); let a; for (a = 0; a < t.length; a += 1) { - const o = xg(r, t, a); + const o = xg(i, t, a); n[a] ? n[a].p(o, s) : (n[a] = Og(o), n[a].c(), n[a].m(e.parentNode, e)); } for (; a < n.length; a += 1) @@ -46258,39 +46258,39 @@ function Rg(i) { n.length = t.length; } }, - d(r) { - r && be(e), c4(n, r); + d(i) { + i && be(e), c4(n, i); } }; } -function Cg(i) { - let e, t, n, r, s = ( +function Cg(r) { + let e, t, n, i, s = ( /*i*/ - i[42] !== 0 && JD() + r[42] !== 0 && JD() ), a = ( /*p*/ - i[40].desc != null && Fg(i) + r[40].desc != null && Fg(r) ), o = ( /*p*/ - i[40].desc != null && /*progress_level*/ - i[14] && /*progress_level*/ - i[14][ + r[40].desc != null && /*progress_level*/ + r[14] && /*progress_level*/ + r[14][ /*i*/ - i[42] + r[42] ] != null && Pg() ), l = ( /*progress_level*/ - i[14] != null && Mg(i) + r[14] != null && Mg(r) ); return { c() { - s && s.c(), e = Yn(), a && a.c(), t = Yn(), o && o.c(), n = Yn(), l && l.c(), r = Jn(); + s && s.c(), e = Yn(), a && a.c(), t = Yn(), o && o.c(), n = Yn(), l && l.c(), i = Jn(); }, l(u) { - s && s.l(u), e = Wn(u), a && a.l(u), t = Wn(u), o && o.l(u), n = Wn(u), l && l.l(u), r = Jn(); + s && s.l(u), e = Wn(u), a && a.l(u), t = Wn(u), o && o.l(u), n = Wn(u), l && l.l(u), i = Jn(); }, m(u, c) { - s && s.m(u, c), Le(u, e, c), a && a.m(u, c), Le(u, t, c), o && o.m(u, c), Le(u, n, c), l && l.m(u, c), Le(u, r, c); + s && s.m(u, c), Le(u, e, c), a && a.m(u, c), Le(u, t, c), o && o.m(u, c), Le(u, n, c), l && l.m(u, c), Le(u, i, c); }, p(u, c) { /*p*/ @@ -46301,14 +46301,14 @@ function Cg(i) { /*i*/ u[42] ] != null ? o || (o = Pg(), o.c(), o.m(n.parentNode, n)) : o && (o.d(1), o = null), /*progress_level*/ - u[14] != null ? l ? l.p(u, c) : (l = Mg(u), l.c(), l.m(r.parentNode, r)) : l && (l.d(1), l = null); + u[14] != null ? l ? l.p(u, c) : (l = Mg(u), l.c(), l.m(i.parentNode, i)) : l && (l.d(1), l = null); }, d(u) { - u && (be(e), be(t), be(n), be(r)), s && s.d(u), a && a.d(u), o && o.d(u), l && l.d(u); + u && (be(e), be(t), be(n), be(i)), s && s.d(u), a && a.d(u), o && o.d(u), l && l.d(u); } }; } -function JD(i) { +function JD(r) { let e; return { c() { @@ -46325,10 +46325,10 @@ function JD(i) { } }; } -function Fg(i) { +function Fg(r) { let e = ( /*p*/ - i[40].desc + "" + r[40].desc + "" ), t; return { c() { @@ -46337,20 +46337,20 @@ function Fg(i) { l(n) { t = ft(n, e); }, - m(n, r) { - Le(n, t, r); + m(n, i) { + Le(n, t, i); }, - p(n, r) { - r[0] & /*progress*/ + p(n, i) { + i[0] & /*progress*/ 128 && e !== (e = /*p*/ - n[40].desc + "") && ei(t, e); + n[40].desc + "") && er(t, e); }, d(n) { n && be(t); } }; } -function Pg(i) { +function Pg(r) { let e; return { c() { @@ -46367,44 +46367,44 @@ function Pg(i) { } }; } -function Mg(i) { +function Mg(r) { let e = (100 * /*progress_level*/ - (i[14][ + (r[14][ /*i*/ - i[42] + r[42] ] || 0)).toFixed(1) + "", t, n; return { c() { t = mt(e), n = mt("%"); }, - l(r) { - t = ft(r, e), n = ft(r, "%"); + l(i) { + t = ft(i, e), n = ft(i, "%"); }, - m(r, s) { - Le(r, t, s), Le(r, n, s); + m(i, s) { + Le(i, t, s), Le(i, n, s); }, - p(r, s) { + p(i, s) { s[0] & /*progress_level*/ 16384 && e !== (e = (100 * /*progress_level*/ - (r[14][ + (i[14][ /*i*/ - r[42] - ] || 0)).toFixed(1) + "") && ei(t, e); + i[42] + ] || 0)).toFixed(1) + "") && er(t, e); }, - d(r) { - r && (be(t), be(n)); + d(i) { + i && (be(t), be(n)); } }; } -function Og(i) { +function Og(r) { let e, t = ( /*p*/ - (i[40].desc != null || /*progress_level*/ - i[14] && /*progress_level*/ - i[14][ + (r[40].desc != null || /*progress_level*/ + r[14] && /*progress_level*/ + r[14][ /*i*/ - i[42] - ] != null) && Cg(i) + r[42] + ] != null) && Cg(r) ); return { c() { @@ -46413,71 +46413,71 @@ function Og(i) { l(n) { t && t.l(n), e = Jn(); }, - m(n, r) { - t && t.m(n, r), Le(n, e, r); + m(n, i) { + t && t.m(n, i), Le(n, e, i); }, - p(n, r) { + p(n, i) { /*p*/ n[40].desc != null || /*progress_level*/ n[14] && /*progress_level*/ n[14][ /*i*/ n[42] - ] != null ? t ? t.p(n, r) : (t = Cg(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + ] != null ? t ? t.p(n, i) : (t = Cg(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { n && be(e), t && t.d(n); } }; } -function Bg(i) { - let e, t, n, r; +function Bg(r) { + let e, t, n, i; const s = ( /*#slots*/ - i[30]["additional-loading-text"] + r[30]["additional-loading-text"] ), a = l4( s, - i, + r, /*$$scope*/ - i[29], + r[29], Ag ); return { c() { - e = Bi("p"), t = mt( + e = Br("p"), t = mt( /*loading_text*/ - i[9] + r[9] ), n = Yn(), a && a.c(), this.h(); }, l(o) { - e = Oi(o, "P", { class: !0 }); - var l = Mi(e); + e = Or(o, "P", { class: !0 }); + var l = Mr(e); t = ft( l, /*loading_text*/ - i[9] + r[9] ), l.forEach(be), n = Wn(o), a && a.l(o), this.h(); }, h() { - vi(e, "class", "loading svelte-17v219f"); + vr(e, "class", "loading svelte-17v219f"); }, m(o, l) { - Le(o, e, l), Xr(e, t), Le(o, n, l), a && a.m(o, l), r = !0; + Le(o, e, l), Xi(e, t), Le(o, n, l), a && a.m(o, l), i = !0; }, p(o, l) { - (!r || l[0] & /*loading_text*/ - 512) && ei( + (!i || l[0] & /*loading_text*/ + 512) && er( t, /*loading_text*/ o[9] - ), a && a.p && (!r || l[0] & /*$$scope*/ + ), a && a.p && (!i || l[0] & /*$$scope*/ 536870912) && m4( a, s, o, /*$$scope*/ o[29], - r ? d4( + i ? d4( s, /*$$scope*/ o[29], @@ -46491,18 +46491,18 @@ function Bg(i) { ); }, i(o) { - r || (gi(a, o), r = !0); + i || (gr(a, o), i = !0); }, o(o) { - Ni(a, o), r = !1; + Nr(a, o), i = !1; }, d(o) { o && (be(e), be(n)), a && a.d(o); } }; } -function ek(i) { - let e, t, n, r, s; +function ek(r) { + let e, t, n, i, s; const a = [VD, qD], o = []; function l(u, c) { return ( @@ -46513,65 +46513,65 @@ function ek(i) { ) ); } - return ~(t = l(i)) && (n = o[t] = a[t](i)), { + return ~(t = l(r)) && (n = o[t] = a[t](r)), { c() { - e = Bi("div"), n && n.c(), this.h(); + e = Br("div"), n && n.c(), this.h(); }, l(u) { - e = Oi(u, "DIV", { class: !0 }); - var c = Mi(e); + e = Or(u, "DIV", { class: !0 }); + var c = Mr(e); n && n.l(c), c.forEach(be), this.h(); }, h() { - vi(e, "class", r = "wrap " + /*variant*/ - i[8] + " " + /*show_progress*/ - i[6] + " svelte-17v219f"), Vn(e, "hide", !/*status*/ - i[4] || /*status*/ - i[4] === "complete" || /*show_progress*/ - i[6] === "hidden" || /*status*/ - i[4] == "streaming"), Vn( + vr(e, "class", i = "wrap " + /*variant*/ + r[8] + " " + /*show_progress*/ + r[6] + " svelte-17v219f"), Vn(e, "hide", !/*status*/ + r[4] || /*status*/ + r[4] === "complete" || /*show_progress*/ + r[6] === "hidden" || /*status*/ + r[4] == "streaming"), Vn( e, "translucent", /*variant*/ - i[8] === "center" && /*status*/ - (i[4] === "pending" || /*status*/ - i[4] === "error") || /*translucent*/ - i[11] || /*show_progress*/ - i[6] === "minimal" + r[8] === "center" && /*status*/ + (r[4] === "pending" || /*status*/ + r[4] === "error") || /*translucent*/ + r[11] || /*show_progress*/ + r[6] === "minimal" ), Vn( e, "generating", /*status*/ - i[4] === "generating" && /*show_progress*/ - i[6] === "full" + r[4] === "generating" && /*show_progress*/ + r[6] === "full" ), Vn( e, "border", /*border*/ - i[12] - ), Sr( + r[12] + ), Si( e, "position", /*absolute*/ - i[10] ? "absolute" : "static" - ), Sr( + r[10] ? "absolute" : "static" + ), Si( e, "padding", /*absolute*/ - i[10] ? "0" : "var(--size-8) 0" + r[10] ? "0" : "var(--size-8) 0" ); }, m(u, c) { - Le(u, e, c), ~t && o[t].m(e, null), i[33](e), s = !0; + Le(u, e, c), ~t && o[t].m(e, null), r[33](e), s = !0; }, p(u, c) { let h = t; - t = l(u), t === h ? ~t && o[t].p(u, c) : (n && (Jc(), Ni(o[h], 1, 1, () => { + t = l(u), t === h ? ~t && o[t].p(u, c) : (n && (Jc(), Nr(o[h], 1, 1, () => { o[h] = null; - }), Zc()), ~t ? (n = o[t], n ? n.p(u, c) : (n = o[t] = a[t](u), n.c()), gi(n, 1), n.m(e, null)) : n = null), (!s || c[0] & /*variant, show_progress*/ - 320 && r !== (r = "wrap " + /*variant*/ + }), Zc()), ~t ? (n = o[t], n ? n.p(u, c) : (n = o[t] = a[t](u), n.c()), gr(n, 1), n.m(e, null)) : n = null), (!s || c[0] & /*variant, show_progress*/ + 320 && i !== (i = "wrap " + /*variant*/ u[8] + " " + /*show_progress*/ - u[6] + " svelte-17v219f")) && vi(e, "class", r), (!s || c[0] & /*variant, show_progress, status, show_progress*/ + u[6] + " svelte-17v219f")) && vr(e, "class", i), (!s || c[0] & /*variant, show_progress, status, show_progress*/ 336) && Vn(e, "hide", !/*status*/ u[4] || /*status*/ u[4] === "complete" || /*show_progress*/ @@ -46600,13 +46600,13 @@ function ek(i) { /*border*/ u[12] ), c[0] & /*absolute*/ - 1024 && Sr( + 1024 && Si( e, "position", /*absolute*/ u[10] ? "absolute" : "static" ), c[0] & /*absolute*/ - 1024 && Sr( + 1024 && Si( e, "padding", /*absolute*/ @@ -46614,18 +46614,18 @@ function ek(i) { ); }, i(u) { - s || (gi(n), s = !0); + s || (gr(n), s = !0); }, o(u) { - Ni(n), s = !1; + Nr(n), s = !1; }, d(u) { - u && be(e), ~t && o[t].d(), i[33](null); + u && be(e), ~t && o[t].d(), r[33](null); } }; } -var tk = function(i, e, t, n) { - function r(s) { +var tk = function(r, e, t, n) { + function i(s) { return s instanceof t ? s : new t(function(a) { a(s); }); @@ -46646,32 +46646,32 @@ var tk = function(i, e, t, n) { } } function u(c) { - c.done ? s(c.value) : r(c.value).then(o, l); + c.done ? s(c.value) : i(c.value).then(o, l); } - u((n = n.apply(i, e || [])).next()); + u((n = n.apply(r, e || [])).next()); }); }; let Jo = [], nc = !1; -const nk = typeof window < "u", g4 = nk ? window.requestAnimationFrame : (i) => { +const nk = typeof window < "u", g4 = nk ? window.requestAnimationFrame : (r) => { }; -function ik(i) { +function rk(r) { return tk(this, arguments, void 0, function* (e, t = !0) { if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) { if (Jo.push(e), !nc) nc = !0; else return; yield $D(), g4(() => { let n = [0, 0]; - for (let r = 0; r < Jo.length; r++) { - const a = Jo[r].getBoundingClientRect(); - (r === 0 || a.top + window.scrollY <= n[0]) && (n[0] = a.top + window.scrollY, n[1] = r); + for (let i = 0; i < Jo.length; i++) { + const a = Jo[i].getBoundingClientRect(); + (i === 0 || a.top + window.scrollY <= n[0]) && (n[0] = a.top + window.scrollY, n[1] = i); } window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), nc = !1, Jo = []; }); } }); } -function rk(i, e, t) { - let n, { $$slots: r = {}, $$scope: s } = e; +function ik(r, e, t) { + let n, { $$slots: i = {}, $$scope: s } = e; const a = HD(); let { i18n: o } = e, { eta: l = null } = e, { queue_position: u } = e, { queue_size: c } = e, { status: h } = e, { scroll_to_output: d = !1 } = e, { timer: f = !0 } = e, { show_progress: m = "full" } = e, { message: g = null } = e, { progress: p = null } = e, { variant: b = "default" } = e, { loading_text: y = "Loading..." } = e, { absolute: v = !0 } = e, { translucent: T = !1 } = e, { border: A = !1 } = e, { autoscroll: w } = e, D, L = !1, I = 0, R = 0, M = null, P = null, V = 0, U = null, J, Y = null, X = !0; const $ = () => { @@ -46702,22 +46702,22 @@ function rk(i, e, t) { D = K, t(13, D); }); } - return i.$$set = (K) => { + return r.$$set = (K) => { "i18n" in K && t(1, o = K.i18n), "eta" in K && t(0, l = K.eta), "queue_position" in K && t(2, u = K.queue_position), "queue_size" in K && t(3, c = K.queue_size), "status" in K && t(4, h = K.status), "scroll_to_output" in K && t(22, d = K.scroll_to_output), "timer" in K && t(5, f = K.timer), "show_progress" in K && t(6, m = K.show_progress), "message" in K && t(23, g = K.message), "progress" in K && t(7, p = K.progress), "variant" in K && t(8, b = K.variant), "loading_text" in K && t(9, y = K.loading_text), "absolute" in K && t(10, v = K.absolute), "translucent" in K && t(11, T = K.translucent), "border" in K && t(12, A = K.border), "autoscroll" in K && t(24, w = K.autoscroll), "$$scope" in K && t(29, s = K.$$scope); - }, i.$$.update = () => { - i.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/ - 436207617 && (l === null && t(0, l = M), l != null && M !== l && (t(28, P = (performance.now() - I) / 1e3 + l), t(19, B = P.toFixed(1)), t(27, M = l))), i.$$.dirty[0] & /*eta_from_start, timer_diff*/ - 335544320 && t(17, V = P === null || P <= 0 || !R ? null : Math.min(R / P, 1)), i.$$.dirty[0] & /*progress*/ - 128 && p != null && t(18, X = !1), i.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ + }, r.$$.update = () => { + r.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/ + 436207617 && (l === null && t(0, l = M), l != null && M !== l && (t(28, P = (performance.now() - I) / 1e3 + l), t(19, B = P.toFixed(1)), t(27, M = l))), r.$$.dirty[0] & /*eta_from_start, timer_diff*/ + 335544320 && t(17, V = P === null || P <= 0 || !R ? null : Math.min(R / P, 1)), r.$$.dirty[0] & /*progress*/ + 128 && p != null && t(18, X = !1), r.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ 114816 && (p != null ? t(14, U = p.map((K) => { if (K.index != null && K.length != null) return K.index / K.length; if (K.progress != null) return K.progress; - })) : t(14, U = null), U ? (t(15, J = U[U.length - 1]), Y && (J === 0 ? t(16, Y.style.transition = "0", Y) : t(16, Y.style.transition = "150ms", Y))) : t(15, J = void 0)), i.$$.dirty[0] & /*status*/ - 16 && (h === "pending" ? $() : ne()), i.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ - 20979728 && D && d && (h === "pending" || h === "complete") && ik(D, w), i.$$.dirty[0] & /*status, message*/ - 8388624, i.$$.dirty[0] & /*timer_diff*/ + })) : t(14, U = null), U ? (t(15, J = U[U.length - 1]), Y && (J === 0 ? t(16, Y.style.transition = "0", Y) : t(16, Y.style.transition = "150ms", Y))) : t(15, J = void 0)), r.$$.dirty[0] & /*status*/ + 16 && (h === "pending" ? $() : ne()), r.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ + 20979728 && D && d && (h === "pending" || h === "complete") && rk(D, w), r.$$.dirty[0] & /*status, message*/ + 8388624, r.$$.dirty[0] & /*timer_diff*/ 67108864 && t(20, n = R.toFixed(1)); }, [ l, @@ -46750,7 +46750,7 @@ function rk(i, e, t) { M, P, s, - r, + i, q, se, he @@ -46761,7 +46761,7 @@ class sk extends OD { super(), BD( this, e, - rk, + ik, ek, ND, { @@ -46797,92 +46797,92 @@ const { } = Object; let { freeze: mn, - seal: ti, + seal: tr, create: th } = Object, { apply: nh, - construct: ih + construct: rh } = typeof Reflect < "u" && Reflect; mn || (mn = function(e) { return e; }); -ti || (ti = function(e) { +tr || (tr = function(e) { return e; }); nh || (nh = function(e, t) { - for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), s = 2; s < n; s++) - r[s - 2] = arguments[s]; - return e.apply(t, r); + for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), s = 2; s < n; s++) + i[s - 2] = arguments[s]; + return e.apply(t, i); }); -ih || (ih = function(e) { - for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) - n[r - 1] = arguments[r]; +rh || (rh = function(e) { + for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) + n[i - 1] = arguments[i]; return new e(...n); }); -const el = gn(Array.prototype.forEach), uk = gn(Array.prototype.lastIndexOf), $g = gn(Array.prototype.pop), ma = gn(Array.prototype.push), ck = gn(Array.prototype.splice), gl = gn(String.prototype.toLowerCase), ic = gn(String.prototype.toString), rc = gn(String.prototype.match), ga = gn(String.prototype.replace), hk = gn(String.prototype.indexOf), dk = gn(String.prototype.trim), di = gn(Object.prototype.hasOwnProperty), ln = gn(RegExp.prototype.test), pa = fk(TypeError); -function gn(i) { +const el = gn(Array.prototype.forEach), uk = gn(Array.prototype.lastIndexOf), $g = gn(Array.prototype.pop), ma = gn(Array.prototype.push), ck = gn(Array.prototype.splice), gl = gn(String.prototype.toLowerCase), rc = gn(String.prototype.toString), ic = gn(String.prototype.match), ga = gn(String.prototype.replace), hk = gn(String.prototype.indexOf), dk = gn(String.prototype.trim), dr = gn(Object.prototype.hasOwnProperty), ln = gn(RegExp.prototype.test), pa = fk(TypeError); +function gn(r) { return function(e) { e instanceof RegExp && (e.lastIndex = 0); - for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) - n[r - 1] = arguments[r]; - return nh(i, e, n); + for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) + n[i - 1] = arguments[i]; + return nh(r, e, n); }; } -function fk(i) { +function fk(r) { return function() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; - return ih(i, t); + return rh(r, t); }; } -function Oe(i, e) { +function Oe(r, e) { let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : gl; - Ng && Ng(i, null); + Ng && Ng(r, null); let n = e.length; for (; n--; ) { - let r = e[n]; - if (typeof r == "string") { - const s = t(r); - s !== r && (ak(e) || (e[n] = s), r = s); + let i = e[n]; + if (typeof i == "string") { + const s = t(i); + s !== i && (ak(e) || (e[n] = s), i = s); } - i[r] = !0; + r[i] = !0; } - return i; + return r; } -function mk(i) { - for (let e = 0; e < i.length; e++) - di(i, e) || (i[e] = null); - return i; +function mk(r) { + for (let e = 0; e < r.length; e++) + dr(r, e) || (r[e] = null); + return r; } -function xi(i) { +function xr(r) { const e = th(null); - for (const [t, n] of p4(i)) - di(i, t) && (Array.isArray(n) ? e[t] = mk(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = xi(n) : e[t] = n); + for (const [t, n] of p4(r)) + dr(r, t) && (Array.isArray(n) ? e[t] = mk(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = xr(n) : e[t] = n); return e; } -function _a(i, e) { - for (; i !== null; ) { - const n = lk(i, e); +function _a(r, e) { + for (; r !== null; ) { + const n = lk(r, e); if (n) { if (n.get) return gn(n.get); if (typeof n.value == "function") return gn(n.value); } - i = ok(i); + r = ok(r); } function t() { return null; } return t; } -const Ug = mn(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), sc = mn(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ac = mn(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), gk = mn(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), oc = mn(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), pk = mn(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Hg = mn(["#text"]), Gg = mn(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), lc = mn(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), zg = mn(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), tl = mn(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), _k = ti(/\{\{[\w\W]*|[\w\W]*\}\}/gm), vk = ti(/<%[\w\W]*|[\w\W]*%>/gm), yk = ti(/\$\{[\w\W]*/gm), bk = ti(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ek = ti(/^aria-[\-\w]+$/), _4 = ti( +const Ug = mn(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), sc = mn(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ac = mn(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), gk = mn(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), oc = mn(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), pk = mn(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Hg = mn(["#text"]), Gg = mn(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), lc = mn(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), zg = mn(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), tl = mn(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), _k = tr(/\{\{[\w\W]*|[\w\W]*\}\}/gm), vk = tr(/<%[\w\W]*|[\w\W]*%>/gm), yk = tr(/\$\{[\w\W]*/gm), bk = tr(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ek = tr(/^aria-[\-\w]+$/), _4 = tr( /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape -), Sk = ti(/^(?:\w+script|data):/i), Tk = ti( +), Sk = tr(/^(?:\w+script|data):/i), Tk = tr( /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex -), v4 = ti(/^html$/i), Ak = ti(/^[a-z][.\w]*(-[.\w]+)+$/i); +), v4 = tr(/^html$/i), Ak = tr(/^[a-z][.\w]*(-[.\w]+)+$/i); var qg = /* @__PURE__ */ Object.freeze({ __proto__: null, ARIA_ATTR: Ek, @@ -46909,8 +46909,8 @@ const va = { if (typeof e != "object" || typeof e.createPolicy != "function") return null; let n = null; - const r = "data-tt-policy-suffix"; - t && t.hasAttribute(r) && (n = t.getAttribute(r)); + const i = "data-tt-policy-suffix"; + t && t.hasAttribute(i) && (n = t.getAttribute(i)); const s = "dompurify" + (n ? "#" + n : ""); try { return e.createPolicy(s, { @@ -46938,24 +46938,24 @@ const va = { }; }; function y4() { - let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : xk(); + let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : xk(); const e = (_e) => y4(_e); - if (e.version = "3.3.1", e.removed = [], !i || !i.document || i.document.nodeType !== va.document || !i.Element) + if (e.version = "3.3.1", e.removed = [], !r || !r.document || r.document.nodeType !== va.document || !r.Element) return e.isSupported = !1, e; let { document: t - } = i; - const n = t, r = n.currentScript, { + } = r; + const n = t, i = n.currentScript, { DocumentFragment: s, HTMLTemplateElement: a, Node: o, Element: l, NodeFilter: u, - NamedNodeMap: c = i.NamedNodeMap || i.MozNamedAttrMap, + NamedNodeMap: c = r.NamedNodeMap || r.MozNamedAttrMap, HTMLFormElement: h, DOMParser: d, trustedTypes: f - } = i, m = l.prototype, g = _a(m, "cloneNode"), p = _a(m, "remove"), b = _a(m, "nextSibling"), y = _a(m, "childNodes"), v = _a(m, "parentNode"); + } = r, m = l.prototype, g = _a(m, "cloneNode"), p = _a(m, "remove"), b = _a(m, "nextSibling"), y = _a(m, "childNodes"), v = _a(m, "parentNode"); if (typeof a == "function") { const _e = t.createElement("template"); _e.content && _e.content.ownerDocument && (t = _e.content.ownerDocument); @@ -47022,16 +47022,16 @@ function y4() { } })); let me = !0, ye = !0, Ie = !1, Rt = !0, qe = !1, bt = !0, Ht = !1, W = !1, Fe = !1, pe = !1, Me = !1, Et = !1, Ct = !0, Gt = !1; - const ur = "user-content-"; + const ui = "user-content-"; let Un = !0, _n = !1, gt = {}, Ft = null; - const Mr = Oe({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); + const Mi = Oe({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); let ee = null; const St = Oe({}, ["audio", "video", "img", "source", "image", "track"]); let nt = null; const Hn = Oe({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), xn = "http://www.w3.org/1998/Math/MathML", Jt = "http://www.w3.org/2000/svg", Bt = "http://www.w3.org/1999/xhtml"; - let ii = Bt, aa = !1, Or = null; - const Ki = Oe({}, [xn, Jt, Bt], ic); - let cr = Oe({}, ["mi", "mo", "mn", "ms", "mtext"]), fo = Oe({}, ["annotation-xml"]); + let rr = Bt, aa = !1, Oi = null; + const Kr = Oe({}, [xn, Jt, Bt], rc); + let ci = Oe({}, ["mi", "mo", "mn", "ms", "mtext"]), fo = Oe({}, ["annotation-xml"]); const w4 = Oe({}, ["title", "style", "font", "a", "script"]); let oa = null; const D4 = ["application/xhtml+xml", "text/html"], k4 = "text/html"; @@ -47041,26 +47041,26 @@ function y4() { }, D0 = function() { let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; if (!(_s && _s === O)) { - if ((!O || typeof O != "object") && (O = {}), O = xi(O), oa = // eslint-disable-next-line unicorn/prefer-includes - D4.indexOf(O.PARSER_MEDIA_TYPE) === -1 ? k4 : O.PARSER_MEDIA_TYPE, Pt = oa === "application/xhtml+xml" ? ic : gl, B = di(O, "ALLOWED_TAGS") ? Oe({}, O.ALLOWED_TAGS, Pt) : q, se = di(O, "ALLOWED_ATTR") ? Oe({}, O.ALLOWED_ATTR, Pt) : he, Or = di(O, "ALLOWED_NAMESPACES") ? Oe({}, O.ALLOWED_NAMESPACES, ic) : Ki, nt = di(O, "ADD_URI_SAFE_ATTR") ? Oe(xi(Hn), O.ADD_URI_SAFE_ATTR, Pt) : Hn, ee = di(O, "ADD_DATA_URI_TAGS") ? Oe(xi(St), O.ADD_DATA_URI_TAGS, Pt) : St, Ft = di(O, "FORBID_CONTENTS") ? Oe({}, O.FORBID_CONTENTS, Pt) : Mr, ge = di(O, "FORBID_TAGS") ? Oe({}, O.FORBID_TAGS, Pt) : xi({}), xe = di(O, "FORBID_ATTR") ? Oe({}, O.FORBID_ATTR, Pt) : xi({}), gt = di(O, "USE_PROFILES") ? O.USE_PROFILES : !1, me = O.ALLOW_ARIA_ATTR !== !1, ye = O.ALLOW_DATA_ATTR !== !1, Ie = O.ALLOW_UNKNOWN_PROTOCOLS || !1, Rt = O.ALLOW_SELF_CLOSE_IN_ATTR !== !1, qe = O.SAFE_FOR_TEMPLATES || !1, bt = O.SAFE_FOR_XML !== !1, Ht = O.WHOLE_DOCUMENT || !1, pe = O.RETURN_DOM || !1, Me = O.RETURN_DOM_FRAGMENT || !1, Et = O.RETURN_TRUSTED_TYPE || !1, Fe = O.FORCE_BODY || !1, Ct = O.SANITIZE_DOM !== !1, Gt = O.SANITIZE_NAMED_PROPS || !1, Un = O.KEEP_CONTENT !== !1, _n = O.IN_PLACE || !1, ne = O.ALLOWED_URI_REGEXP || _4, ii = O.NAMESPACE || Bt, cr = O.MATHML_TEXT_INTEGRATION_POINTS || cr, fo = O.HTML_INTEGRATION_POINTS || fo, K = O.CUSTOM_ELEMENT_HANDLING || {}, O.CUSTOM_ELEMENT_HANDLING && _d(O.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (K.tagNameCheck = O.CUSTOM_ELEMENT_HANDLING.tagNameCheck), O.CUSTOM_ELEMENT_HANDLING && _d(O.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (K.attributeNameCheck = O.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), O.CUSTOM_ELEMENT_HANDLING && typeof O.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = O.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), qe && (ye = !1), Me && (pe = !0), gt && (B = Oe({}, Hg), se = [], gt.html === !0 && (Oe(B, Ug), Oe(se, Gg)), gt.svg === !0 && (Oe(B, sc), Oe(se, lc), Oe(se, tl)), gt.svgFilters === !0 && (Oe(B, ac), Oe(se, lc), Oe(se, tl)), gt.mathMl === !0 && (Oe(B, oc), Oe(se, zg), Oe(se, tl))), O.ADD_TAGS && (typeof O.ADD_TAGS == "function" ? j.tagCheck = O.ADD_TAGS : (B === q && (B = xi(B)), Oe(B, O.ADD_TAGS, Pt))), O.ADD_ATTR && (typeof O.ADD_ATTR == "function" ? j.attributeCheck = O.ADD_ATTR : (se === he && (se = xi(se)), Oe(se, O.ADD_ATTR, Pt))), O.ADD_URI_SAFE_ATTR && Oe(nt, O.ADD_URI_SAFE_ATTR, Pt), O.FORBID_CONTENTS && (Ft === Mr && (Ft = xi(Ft)), Oe(Ft, O.FORBID_CONTENTS, Pt)), O.ADD_FORBID_CONTENTS && (Ft === Mr && (Ft = xi(Ft)), Oe(Ft, O.ADD_FORBID_CONTENTS, Pt)), Un && (B["#text"] = !0), Ht && Oe(B, ["html", "head", "body"]), B.table && (Oe(B, ["tbody"]), delete ge.tbody), O.TRUSTED_TYPES_POLICY) { + if ((!O || typeof O != "object") && (O = {}), O = xr(O), oa = // eslint-disable-next-line unicorn/prefer-includes + D4.indexOf(O.PARSER_MEDIA_TYPE) === -1 ? k4 : O.PARSER_MEDIA_TYPE, Pt = oa === "application/xhtml+xml" ? rc : gl, B = dr(O, "ALLOWED_TAGS") ? Oe({}, O.ALLOWED_TAGS, Pt) : q, se = dr(O, "ALLOWED_ATTR") ? Oe({}, O.ALLOWED_ATTR, Pt) : he, Oi = dr(O, "ALLOWED_NAMESPACES") ? Oe({}, O.ALLOWED_NAMESPACES, rc) : Kr, nt = dr(O, "ADD_URI_SAFE_ATTR") ? Oe(xr(Hn), O.ADD_URI_SAFE_ATTR, Pt) : Hn, ee = dr(O, "ADD_DATA_URI_TAGS") ? Oe(xr(St), O.ADD_DATA_URI_TAGS, Pt) : St, Ft = dr(O, "FORBID_CONTENTS") ? Oe({}, O.FORBID_CONTENTS, Pt) : Mi, ge = dr(O, "FORBID_TAGS") ? Oe({}, O.FORBID_TAGS, Pt) : xr({}), xe = dr(O, "FORBID_ATTR") ? Oe({}, O.FORBID_ATTR, Pt) : xr({}), gt = dr(O, "USE_PROFILES") ? O.USE_PROFILES : !1, me = O.ALLOW_ARIA_ATTR !== !1, ye = O.ALLOW_DATA_ATTR !== !1, Ie = O.ALLOW_UNKNOWN_PROTOCOLS || !1, Rt = O.ALLOW_SELF_CLOSE_IN_ATTR !== !1, qe = O.SAFE_FOR_TEMPLATES || !1, bt = O.SAFE_FOR_XML !== !1, Ht = O.WHOLE_DOCUMENT || !1, pe = O.RETURN_DOM || !1, Me = O.RETURN_DOM_FRAGMENT || !1, Et = O.RETURN_TRUSTED_TYPE || !1, Fe = O.FORCE_BODY || !1, Ct = O.SANITIZE_DOM !== !1, Gt = O.SANITIZE_NAMED_PROPS || !1, Un = O.KEEP_CONTENT !== !1, _n = O.IN_PLACE || !1, ne = O.ALLOWED_URI_REGEXP || _4, rr = O.NAMESPACE || Bt, ci = O.MATHML_TEXT_INTEGRATION_POINTS || ci, fo = O.HTML_INTEGRATION_POINTS || fo, K = O.CUSTOM_ELEMENT_HANDLING || {}, O.CUSTOM_ELEMENT_HANDLING && _d(O.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (K.tagNameCheck = O.CUSTOM_ELEMENT_HANDLING.tagNameCheck), O.CUSTOM_ELEMENT_HANDLING && _d(O.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (K.attributeNameCheck = O.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), O.CUSTOM_ELEMENT_HANDLING && typeof O.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = O.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), qe && (ye = !1), Me && (pe = !0), gt && (B = Oe({}, Hg), se = [], gt.html === !0 && (Oe(B, Ug), Oe(se, Gg)), gt.svg === !0 && (Oe(B, sc), Oe(se, lc), Oe(se, tl)), gt.svgFilters === !0 && (Oe(B, ac), Oe(se, lc), Oe(se, tl)), gt.mathMl === !0 && (Oe(B, oc), Oe(se, zg), Oe(se, tl))), O.ADD_TAGS && (typeof O.ADD_TAGS == "function" ? j.tagCheck = O.ADD_TAGS : (B === q && (B = xr(B)), Oe(B, O.ADD_TAGS, Pt))), O.ADD_ATTR && (typeof O.ADD_ATTR == "function" ? j.attributeCheck = O.ADD_ATTR : (se === he && (se = xr(se)), Oe(se, O.ADD_ATTR, Pt))), O.ADD_URI_SAFE_ATTR && Oe(nt, O.ADD_URI_SAFE_ATTR, Pt), O.FORBID_CONTENTS && (Ft === Mi && (Ft = xr(Ft)), Oe(Ft, O.FORBID_CONTENTS, Pt)), O.ADD_FORBID_CONTENTS && (Ft === Mi && (Ft = xr(Ft)), Oe(Ft, O.ADD_FORBID_CONTENTS, Pt)), Un && (B["#text"] = !0), Ht && Oe(B, ["html", "head", "body"]), B.table && (Oe(B, ["tbody"]), delete ge.tbody), O.TRUSTED_TYPES_POLICY) { if (typeof O.TRUSTED_TYPES_POLICY.createHTML != "function") throw pa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); if (typeof O.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw pa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); T = O.TRUSTED_TYPES_POLICY, A = T.createHTML(""); } else - T === void 0 && (T = wk(f, r)), T !== null && typeof A == "string" && (A = T.createHTML("")); + T === void 0 && (T = wk(f, i)), T !== null && typeof A == "string" && (A = T.createHTML("")); mn && mn(O), _s = O; } }, vd = Oe({}, [...sc, ...ac, ...gk]), yd = Oe({}, [...oc, ...pk]), L4 = function(O) { - let re = v(O); - (!re || !re.tagName) && (re = { - namespaceURI: ii, + let ie = v(O); + (!ie || !ie.tagName) && (ie = { + namespaceURI: rr, tagName: "template" }); - const de = gl(O.tagName), rt = gl(re.tagName); - return Or[O.namespaceURI] ? O.namespaceURI === Jt ? re.namespaceURI === Bt ? de === "svg" : re.namespaceURI === xn ? de === "svg" && (rt === "annotation-xml" || cr[rt]) : !!vd[de] : O.namespaceURI === xn ? re.namespaceURI === Bt ? de === "math" : re.namespaceURI === Jt ? de === "math" && fo[rt] : !!yd[de] : O.namespaceURI === Bt ? re.namespaceURI === Jt && !fo[rt] || re.namespaceURI === xn && !cr[rt] ? !1 : !yd[de] && (w4[de] || !vd[de]) : !!(oa === "application/xhtml+xml" && Or[O.namespaceURI]) : !1; - }, bi = function(O) { + const de = gl(O.tagName), it = gl(ie.tagName); + return Oi[O.namespaceURI] ? O.namespaceURI === Jt ? ie.namespaceURI === Bt ? de === "svg" : ie.namespaceURI === xn ? de === "svg" && (it === "annotation-xml" || ci[it]) : !!vd[de] : O.namespaceURI === xn ? ie.namespaceURI === Bt ? de === "math" : ie.namespaceURI === Jt ? de === "math" && fo[it] : !!yd[de] : O.namespaceURI === Bt ? ie.namespaceURI === Jt && !fo[it] || ie.namespaceURI === xn && !ci[it] ? !1 : !yd[de] && (w4[de] || !vd[de]) : !!(oa === "application/xhtml+xml" && Oi[O.namespaceURI]) : !1; + }, br = function(O) { ma(e.removed, { element: O }); @@ -47069,53 +47069,53 @@ function y4() { } catch { p(O); } - }, Br = function(O, re) { + }, Bi = function(O, ie) { try { ma(e.removed, { - attribute: re.getAttributeNode(O), - from: re + attribute: ie.getAttributeNode(O), + from: ie }); } catch { ma(e.removed, { attribute: null, - from: re + from: ie }); } - if (re.removeAttribute(O), O === "is") + if (ie.removeAttribute(O), O === "is") if (pe || Me) try { - bi(re); + br(ie); } catch { } else try { - re.setAttribute(O, ""); + ie.setAttribute(O, ""); } catch { } }, bd = function(O) { - let re = null, de = null; + let ie = null, de = null; if (Fe) O = "" + O; else { - const wt = rc(O, /^[\r\n\t ]+/); + const wt = ic(O, /^[\r\n\t ]+/); de = wt && wt[0]; } - oa === "application/xhtml+xml" && ii === Bt && (O = '' + O + ""); - const rt = T ? T.createHTML(O) : O; - if (ii === Bt) + oa === "application/xhtml+xml" && rr === Bt && (O = '' + O + ""); + const it = T ? T.createHTML(O) : O; + if (rr === Bt) try { - re = new d().parseFromString(rt, oa); + ie = new d().parseFromString(it, oa); } catch { } - if (!re || !re.documentElement) { - re = w.createDocument(ii, "template", null); + if (!ie || !ie.documentElement) { + ie = w.createDocument(rr, "template", null); try { - re.documentElement.innerHTML = aa ? A : rt; + ie.documentElement.innerHTML = aa ? A : it; } catch { } } - const en = re.body || re.documentElement; - return O && de && en.insertBefore(t.createTextNode(de), en.childNodes[0] || null), ii === Bt ? I.call(re, Ht ? "html" : "body")[0] : Ht ? re.documentElement : en; + const en = ie.body || ie.documentElement; + return O && de && en.insertBefore(t.createTextNode(de), en.childNodes[0] || null), rr === Bt ? I.call(ie, Ht ? "html" : "body")[0] : Ht ? ie.documentElement : en; }, Ed = function(O) { return D.call( O.ownerDocument || O, @@ -47129,59 +47129,59 @@ function y4() { }, Sd = function(O) { return typeof o == "function" && O instanceof o; }; - function ji(_e, O, re) { + function jr(_e, O, ie) { el(_e, (de) => { - de.call(e, O, re, _s); + de.call(e, O, ie, _s); }); } const Td = function(O) { - let re = null; - if (ji(M.beforeSanitizeElements, O, null), k0(O)) - return bi(O), !0; + let ie = null; + if (jr(M.beforeSanitizeElements, O, null), k0(O)) + return br(O), !0; const de = Pt(O.nodeName); - if (ji(M.uponSanitizeElement, O, { + if (jr(M.uponSanitizeElement, O, { tagName: de, allowedTags: B }), bt && O.hasChildNodes() && !Sd(O.firstElementChild) && ln(/<[/\w!]/g, O.innerHTML) && ln(/<[/\w!]/g, O.textContent) || O.nodeType === va.progressingInstruction || bt && O.nodeType === va.comment && ln(/<[/\w]/g, O.data)) - return bi(O), !0; + return br(O), !0; if (!(j.tagCheck instanceof Function && j.tagCheck(de)) && (!B[de] || ge[de])) { if (!ge[de] && xd(de) && (K.tagNameCheck instanceof RegExp && ln(K.tagNameCheck, de) || K.tagNameCheck instanceof Function && K.tagNameCheck(de))) return !1; if (Un && !Ft[de]) { - const rt = v(O) || O.parentNode, en = y(O) || O.childNodes; - if (en && rt) { + const it = v(O) || O.parentNode, en = y(O) || O.childNodes; + if (en && it) { const wt = en.length; for (let vn = wt - 1; vn >= 0; --vn) { - const Wi = g(en[vn], !0); - Wi.__removalCount = (O.__removalCount || 0) + 1, rt.insertBefore(Wi, b(O)); + const Wr = g(en[vn], !0); + Wr.__removalCount = (O.__removalCount || 0) + 1, it.insertBefore(Wr, b(O)); } } } - return bi(O), !0; + return br(O), !0; } - return O instanceof l && !L4(O) || (de === "noscript" || de === "noembed" || de === "noframes") && ln(/<\/no(script|embed|frames)/i, O.innerHTML) ? (bi(O), !0) : (qe && O.nodeType === va.text && (re = O.textContent, el([P, V, U], (rt) => { - re = ga(re, rt, " "); - }), O.textContent !== re && (ma(e.removed, { + return O instanceof l && !L4(O) || (de === "noscript" || de === "noembed" || de === "noframes") && ln(/<\/no(script|embed|frames)/i, O.innerHTML) ? (br(O), !0) : (qe && O.nodeType === va.text && (ie = O.textContent, el([P, V, U], (it) => { + ie = ga(ie, it, " "); + }), O.textContent !== ie && (ma(e.removed, { element: O.cloneNode() - }), O.textContent = re)), ji(M.afterSanitizeElements, O, null), !1); - }, Ad = function(O, re, de) { - if (Ct && (re === "id" || re === "name") && (de in t || de in I4)) + }), O.textContent = ie)), jr(M.afterSanitizeElements, O, null), !1); + }, Ad = function(O, ie, de) { + if (Ct && (ie === "id" || ie === "name") && (de in t || de in I4)) return !1; - if (!(ye && !xe[re] && ln(J, re))) { - if (!(me && ln(Y, re))) { - if (!(j.attributeCheck instanceof Function && j.attributeCheck(re, O))) { - if (!se[re] || xe[re]) { + if (!(ye && !xe[ie] && ln(J, ie))) { + if (!(me && ln(Y, ie))) { + if (!(j.attributeCheck instanceof Function && j.attributeCheck(ie, O))) { + if (!se[ie] || xe[ie]) { if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck - !(xd(O) && (K.tagNameCheck instanceof RegExp && ln(K.tagNameCheck, O) || K.tagNameCheck instanceof Function && K.tagNameCheck(O)) && (K.attributeNameCheck instanceof RegExp && ln(K.attributeNameCheck, re) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(re, O)) || // Alternative, second condition checks if it's an `is`-attribute, AND + !(xd(O) && (K.tagNameCheck instanceof RegExp && ln(K.tagNameCheck, O) || K.tagNameCheck instanceof Function && K.tagNameCheck(O)) && (K.attributeNameCheck instanceof RegExp && ln(K.attributeNameCheck, ie) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(ie, O)) || // Alternative, second condition checks if it's an `is`-attribute, AND // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck - re === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && ln(K.tagNameCheck, de) || K.tagNameCheck instanceof Function && K.tagNameCheck(de))) + ie === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && ln(K.tagNameCheck, de) || K.tagNameCheck instanceof Function && K.tagNameCheck(de))) ) return !1; - } else if (!nt[re]) { + } else if (!nt[ie]) { if (!ln(ne, ga(de, $, ""))) { - if (!((re === "src" || re === "xlink:href" || re === "href") && O !== "script" && hk(de, "data:") === 0 && ee[O])) { + if (!((ie === "src" || ie === "xlink:href" || ie === "href") && O !== "script" && hk(de, "data:") === 0 && ee[O])) { if (!(Ie && !ln(X, ga(de, $, "")))) { if (de) return !1; @@ -47194,13 +47194,13 @@ function y4() { } return !0; }, xd = function(O) { - return O !== "annotation-xml" && rc(O, Z); + return O !== "annotation-xml" && ic(O, Z); }, wd = function(O) { - ji(M.beforeSanitizeAttributes, O, null); + jr(M.beforeSanitizeAttributes, O, null); const { - attributes: re + attributes: ie } = O; - if (!re || k0(O)) + if (!ie || k0(O)) return; const de = { attrName: "", @@ -47209,30 +47209,30 @@ function y4() { allowedAttributes: se, forceKeepAttr: void 0 }; - let rt = re.length; - for (; rt--; ) { - const en = re[rt], { + let it = ie.length; + for (; it--; ) { + const en = ie[it], { name: wt, namespaceURI: vn, - value: Wi - } = en, vs = Pt(wt), I0 = Wi; + value: Wr + } = en, vs = Pt(wt), I0 = Wr; let zt = wt === "value" ? I0 : dk(I0); - if (de.attrName = vs, de.attrValue = zt, de.keepAttr = !0, de.forceKeepAttr = void 0, ji(M.uponSanitizeAttribute, O, de), zt = de.attrValue, Gt && (vs === "id" || vs === "name") && (Br(wt, O), zt = ur + zt), bt && ln(/((--!?|])>)|<\/(style|title|textarea)/i, zt)) { - Br(wt, O); + if (de.attrName = vs, de.attrValue = zt, de.keepAttr = !0, de.forceKeepAttr = void 0, jr(M.uponSanitizeAttribute, O, de), zt = de.attrValue, Gt && (vs === "id" || vs === "name") && (Bi(wt, O), zt = ui + zt), bt && ln(/((--!?|])>)|<\/(style|title|textarea)/i, zt)) { + Bi(wt, O); continue; } - if (vs === "attributename" && rc(zt, "href")) { - Br(wt, O); + if (vs === "attributename" && ic(zt, "href")) { + Bi(wt, O); continue; } if (de.forceKeepAttr) continue; if (!de.keepAttr) { - Br(wt, O); + Bi(wt, O); continue; } if (!Rt && ln(/\/>/i, zt)) { - Br(wt, O); + Bi(wt, O); continue; } qe && el([P, V, U], (kd) => { @@ -47240,7 +47240,7 @@ function y4() { }); const Dd = Pt(O.nodeName); if (!Ad(Dd, vs, zt)) { - Br(wt, O); + Bi(wt, O); continue; } if (T && typeof f == "object" && typeof f.getAttributeType == "function" && !vn) @@ -47256,21 +47256,21 @@ function y4() { } if (zt !== I0) try { - vn ? O.setAttributeNS(vn, wt, zt) : O.setAttribute(wt, zt), k0(O) ? bi(O) : $g(e.removed); + vn ? O.setAttributeNS(vn, wt, zt) : O.setAttribute(wt, zt), k0(O) ? br(O) : $g(e.removed); } catch { - Br(wt, O); + Bi(wt, O); } } - ji(M.afterSanitizeAttributes, O, null); + jr(M.afterSanitizeAttributes, O, null); }, R4 = function _e(O) { - let re = null; + let ie = null; const de = Ed(O); - for (ji(M.beforeSanitizeShadowDOM, O, null); re = de.nextNode(); ) - ji(M.uponSanitizeShadowNode, re, null), Td(re), wd(re), re.content instanceof s && _e(re.content); - ji(M.afterSanitizeShadowDOM, O, null); + for (jr(M.beforeSanitizeShadowDOM, O, null); ie = de.nextNode(); ) + jr(M.uponSanitizeShadowNode, ie, null), Td(ie), wd(ie), ie.content instanceof s && _e(ie.content); + jr(M.afterSanitizeShadowDOM, O, null); }; return e.sanitize = function(_e) { - let O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, re = null, de = null, rt = null, en = null; + let O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ie = null, de = null, it = null, en = null; if (aa = !_e, aa && (_e = ""), typeof _e != "string" && !Sd(_e)) if (typeof _e.toString == "function") { if (_e = _e.toString(), typeof _e != "string") @@ -47281,53 +47281,53 @@ function y4() { return _e; if (W || D0(O), e.removed = [], typeof _e == "string" && (_n = !1), _n) { if (_e.nodeName) { - const Wi = Pt(_e.nodeName); - if (!B[Wi] || ge[Wi]) + const Wr = Pt(_e.nodeName); + if (!B[Wr] || ge[Wr]) throw pa("root node is forbidden and cannot be sanitized in-place"); } } else if (_e instanceof o) - re = bd(""), de = re.ownerDocument.importNode(_e, !0), de.nodeType === va.element && de.nodeName === "BODY" || de.nodeName === "HTML" ? re = de : re.appendChild(de); + ie = bd(""), de = ie.ownerDocument.importNode(_e, !0), de.nodeType === va.element && de.nodeName === "BODY" || de.nodeName === "HTML" ? ie = de : ie.appendChild(de); else { if (!pe && !qe && !Ht && // eslint-disable-next-line unicorn/prefer-includes _e.indexOf("<") === -1) return T && Et ? T.createHTML(_e) : _e; - if (re = bd(_e), !re) + if (ie = bd(_e), !ie) return pe ? null : Et ? A : ""; } - re && Fe && bi(re.firstChild); - const wt = Ed(_n ? _e : re); - for (; rt = wt.nextNode(); ) - Td(rt), wd(rt), rt.content instanceof s && R4(rt.content); + ie && Fe && br(ie.firstChild); + const wt = Ed(_n ? _e : ie); + for (; it = wt.nextNode(); ) + Td(it), wd(it), it.content instanceof s && R4(it.content); if (_n) return _e; if (pe) { if (Me) - for (en = L.call(re.ownerDocument); re.firstChild; ) - en.appendChild(re.firstChild); + for (en = L.call(ie.ownerDocument); ie.firstChild; ) + en.appendChild(ie.firstChild); else - en = re; + en = ie; return (se.shadowroot || se.shadowrootmode) && (en = R.call(n, en, !0)), en; } - let vn = Ht ? re.outerHTML : re.innerHTML; - return Ht && B["!doctype"] && re.ownerDocument && re.ownerDocument.doctype && re.ownerDocument.doctype.name && ln(v4, re.ownerDocument.doctype.name) && (vn = " -` + vn), qe && el([P, V, U], (Wi) => { - vn = ga(vn, Wi, " "); + let vn = Ht ? ie.outerHTML : ie.innerHTML; + return Ht && B["!doctype"] && ie.ownerDocument && ie.ownerDocument.doctype && ie.ownerDocument.doctype.name && ln(v4, ie.ownerDocument.doctype.name) && (vn = " +` + vn), qe && el([P, V, U], (Wr) => { + vn = ga(vn, Wr, " "); }), T && Et ? T.createHTML(vn) : vn; }, e.setConfig = function() { let _e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; D0(_e), W = !0; }, e.clearConfig = function() { _s = null, W = !1; - }, e.isValidAttribute = function(_e, O, re) { + }, e.isValidAttribute = function(_e, O, ie) { _s || D0({}); - const de = Pt(_e), rt = Pt(O); - return Ad(de, rt, re); + const de = Pt(_e), it = Pt(O); + return Ad(de, it, ie); }, e.addHook = function(_e, O) { typeof O == "function" && ma(M[_e], O); }, e.removeHook = function(_e, O) { if (O !== void 0) { - const re = uk(M[_e], O); - return re === -1 ? void 0 : ck(M[_e], re, 1)[0]; + const ie = uk(M[_e], O); + return ie === -1 ? void 0 : ck(M[_e], ie, 1)[0]; } return $g(M[_e]); }, e.removeHooks = function(_e) { @@ -47341,8 +47341,8 @@ const { HtmlTagHydration: eK, SvelteComponent: tK, add_render_callback: nK, - append_hydration: iK, - attr: rK, + append_hydration: rK, + attr: iK, bubble: sK, check_outros: aK, children: oK, @@ -47394,8 +47394,8 @@ const { init: ej, insert_hydration: tj, mount_component: nj, - noop: ij, - safe_not_equal: rj, + noop: rj, + safe_not_equal: ij, set_style: sj, space: aj, transition_in: oj, @@ -47414,12 +47414,12 @@ const { noop: yj, safe_not_equal: bj, set_style: Ej -} = window.__gradio__svelte__internal, Kg = (i) => { +} = window.__gradio__svelte__internal, Kg = (r) => { let e = ["B", "KB", "MB", "GB", "PB"], t = 0; - for (; i > 1024; ) - i /= 1024, t++; + for (; r > 1024; ) + r /= 1024, t++; let n = e[t]; - return i.toFixed(1) + " " + n; + return r.toFixed(1) + " " + n; }, { HtmlTagHydration: Dk, SvelteComponent: kk, @@ -47427,29 +47427,29 @@ const { attr: Ut, bubble: Ik, check_outros: b4, - children: ir, + children: ri, claim_component: Lk, - claim_element: pi, + claim_element: pr, claim_html_tag: Rk, claim_space: ya, claim_text: Zl, create_component: Ck, destroy_component: Fk, detach: cn, - element: _i, + element: _r, ensure_array_like: jg, get_svelte_dataset: E4, group_outros: S4, init: Pk, insert_hydration: sa, - listen: br, + listen: bi, mount_component: Mk, noop: Wg, outro_and_destroy_block: Ok, prevent_default: Bk, run_all: T4, safe_not_equal: Nk, - set_data: rh, + set_data: ih, set_style: Yg, space: ba, text: Jl, @@ -47458,34 +47458,34 @@ const { transition_out: t0, update_keyed_each: $k } = window.__gradio__svelte__internal, { createEventDispatcher: Uk } = window.__gradio__svelte__internal; -function Xg(i, e, t) { - const n = i.slice(); +function Xg(r, e, t) { + const n = r.slice(); return n[25] = e[t], n[27] = t, n; } -function Qg(i) { +function Qg(r) { let e, t = "⋮⋮"; return { c() { - e = _i("span"), e.textContent = t, this.h(); + e = _r("span"), e.textContent = t, this.h(); }, l(n) { - e = pi(n, "SPAN", { class: !0, "data-svelte-h": !0 }), E4(e) !== "svelte-1u4up0a" && (e.textContent = t), this.h(); + e = pr(n, "SPAN", { class: !0, "data-svelte-h": !0 }), E4(e) !== "svelte-1u4up0a" && (e.textContent = t), this.h(); }, h() { Ut(e, "class", "drag-handle svelte-jeg2l6"); }, - m(n, r) { - sa(n, e, r); + m(n, i) { + sa(n, e, i); }, d(n) { n && cn(e); } }; } -function Hk(i) { +function Hk(r) { let e = ( /*i18n*/ - i[2]("file.uploading") + "" + r[2]("file.uploading") + "" ), t; return { c() { @@ -47494,13 +47494,13 @@ function Hk(i) { l(n) { t = Zl(n, e); }, - m(n, r) { - sa(n, t, r); + m(n, i) { + sa(n, t, i); }, - p(n, r) { - r & /*i18n*/ + p(n, i) { + i & /*i18n*/ 4 && e !== (e = /*i18n*/ - n[2]("file.uploading") + "") && rh(t, e); + n[2]("file.uploading") + "") && ih(t, e); }, i: Wg, o: Wg, @@ -47509,14 +47509,14 @@ function Hk(i) { } }; } -function Gk(i) { +function Gk(r) { let e, t; function n() { return ( /*click_handler*/ - i[17]( + r[17]( /*file*/ - i[25] + r[25] ) ); } @@ -47524,115 +47524,115 @@ function Gk(i) { props: { href: ( /*file*/ - i[25].url + r[25].url ), download: ( /*is_browser*/ - i[14] && window.__is_colab__ ? null : ( + r[14] && window.__is_colab__ ? null : ( /*file*/ - i[25].orig_name + r[25].orig_name ) ), $$slots: { default: [zk] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }), e.$on("click", n), { c() { Ck(e.$$.fragment); }, - l(r) { - Lk(e.$$.fragment, r); + l(i) { + Lk(e.$$.fragment, i); }, - m(r, s) { - Mk(e, r, s), t = !0; + m(i, s) { + Mk(e, i, s), t = !0; }, - p(r, s) { - i = r; + p(i, s) { + r = i; const a = {}; s & /*normalized_files*/ 64 && (a.href = /*file*/ - i[25].url), s & /*normalized_files*/ + r[25].url), s & /*normalized_files*/ 64 && (a.download = /*is_browser*/ - i[14] && window.__is_colab__ ? null : ( + r[14] && window.__is_colab__ ? null : ( /*file*/ - i[25].orig_name + r[25].orig_name )), s & /*$$scope, normalized_files*/ - 268435520 && (a.$$scope = { dirty: s, ctx: i }), e.$set(a); + 268435520 && (a.$$scope = { dirty: s, ctx: r }), e.$set(a); }, - i(r) { - t || (e0(e.$$.fragment, r), t = !0); + i(i) { + t || (e0(e.$$.fragment, i), t = !0); }, - o(r) { - t0(e.$$.fragment, r), t = !1; + o(i) { + t0(e.$$.fragment, i), t = !1; }, - d(r) { - Fk(e, r); + d(i) { + Fk(e, i); } }; } -function zk(i) { +function zk(r) { let e, t = ( /*file*/ - (i[25].size != null ? Kg( + (r[25].size != null ? Kg( /*file*/ - i[25].size + r[25].size ) : "(size unknown)") + "" ), n; return { c() { e = new Dk(!1), n = Jl(" ⇣"), this.h(); }, - l(r) { - e = Rk(r, !1), n = Zl(r, " ⇣"), this.h(); + l(i) { + e = Rk(i, !1), n = Zl(i, " ⇣"), this.h(); }, h() { e.a = n; }, - m(r, s) { - e.m(t, r, s), sa(r, n, s); + m(i, s) { + e.m(t, i, s), sa(i, n, s); }, - p(r, s) { + p(i, s) { s & /*normalized_files*/ 64 && t !== (t = /*file*/ - (r[25].size != null ? Kg( + (i[25].size != null ? Kg( /*file*/ - r[25].size + i[25].size ) : "(size unknown)") + "") && e.p(t); }, - d(r) { - r && (e.d(), cn(n)); + d(i) { + i && (e.d(), cn(n)); } }; } -function Zg(i) { - let e, t, n = "×", r, s; +function Zg(r) { + let e, t, n = "×", i, s; function a() { return ( /*click_handler_1*/ - i[18]( + r[18]( /*i*/ - i[27] + r[27] ) ); } function o(...l) { return ( /*keydown_handler*/ - i[19]( + r[19]( /*i*/ - i[27], + r[27], ...l ) ); } return { c() { - e = _i("td"), t = _i("button"), t.textContent = n, this.h(); + e = _r("td"), t = _r("button"), t.textContent = n, this.h(); }, l(l) { - e = pi(l, "TD", { class: !0 }); - var u = ir(e); - t = pi(u, "BUTTON", { + e = pr(l, "TD", { class: !0 }); + var u = ri(e); + t = pr(u, "BUTTON", { class: !0, "aria-label": !0, "data-svelte-h": !0 @@ -47642,21 +47642,21 @@ function Zg(i) { Ut(t, "class", "label-clear-button svelte-jeg2l6"), Ut(t, "aria-label", "Remove this file"), Ut(e, "class", "svelte-jeg2l6"); }, m(l, u) { - sa(l, e, u), bn(e, t), r || (s = [ - br(t, "click", a), - br(t, "keydown", o) - ], r = !0); + sa(l, e, u), bn(e, t), i || (s = [ + bi(t, "click", a), + bi(t, "keydown", o) + ], i = !0); }, p(l, u) { - i = l; + r = l; }, d(l) { - l && cn(e), r = !1, T4(s); + l && cn(e), i = !1, T4(s); } }; } -function Jg(i, e) { - let t, n, r, s, a = ( +function Jg(r, e) { + let t, n, i, s, a = ( /*file*/ e[25].filename_stem + "" ), o, l, u, c = ( @@ -47720,26 +47720,26 @@ function Jg(i, e) { ); } return { - key: i, + key: r, first: null, c() { - t = _i("tr"), n = _i("td"), L && L.c(), r = ba(), s = _i("span"), o = Jl(a), l = ba(), u = _i("span"), h = Jl(c), f = ba(), m = _i("td"), p.c(), b = ba(), P && P.c(), y = ba(), this.h(); + t = _r("tr"), n = _r("td"), L && L.c(), i = ba(), s = _r("span"), o = Jl(a), l = ba(), u = _r("span"), h = Jl(c), f = ba(), m = _r("td"), p.c(), b = ba(), P && P.c(), y = ba(), this.h(); }, l(X) { - t = pi(X, "TR", { + t = pr(X, "TR", { class: !0, "data-drop-target": !0, draggable: !0 }); - var $ = ir(t); - n = pi($, "TD", { class: !0, "aria-label": !0 }); - var Z = ir(n); - L && L.l(Z), r = ya(Z), s = pi(Z, "SPAN", { class: !0 }); - var ne = ir(s); - o = Zl(ne, a), ne.forEach(cn), l = ya(Z), u = pi(Z, "SPAN", { class: !0 }); - var B = ir(u); - h = Zl(B, c), B.forEach(cn), Z.forEach(cn), f = ya($), m = pi($, "TD", { class: !0 }); - var q = ir(m); + var $ = ri(t); + n = pr($, "TD", { class: !0, "aria-label": !0 }); + var Z = ri(n); + L && L.l(Z), i = ya(Z), s = pr(Z, "SPAN", { class: !0 }); + var ne = ri(s); + o = Zl(ne, a), ne.forEach(cn), l = ya(Z), u = pr(Z, "SPAN", { class: !0 }); + var B = ri(u); + h = Zl(B, c), B.forEach(cn), Z.forEach(cn), f = ya($), m = pr($, "TD", { class: !0 }); + var q = ri(m); p.l(q), q.forEach(cn), b = ya($), P && P.l($), y = ya($), $.forEach(cn), this.h(); }, h() { @@ -47776,16 +47776,16 @@ function Jg(i, e) { ), this.first = t; }, m(X, $) { - sa(X, t, $), bn(t, n), L && L.m(n, null), bn(n, r), bn(n, s), bn(s, o), bn(n, l), bn(n, u), bn(u, h), bn(t, f), bn(t, m), R[g].m(m, null), bn(t, b), P && P.m(t, null), bn(t, y), A = !0, w || (D = [ - br(t, "click", V), - br(t, "dragstart", U), - br(t, "dragenter", Bk( + sa(X, t, $), bn(t, n), L && L.m(n, null), bn(n, i), bn(n, s), bn(s, o), bn(n, l), bn(n, u), bn(u, h), bn(t, f), bn(t, m), R[g].m(m, null), bn(t, b), P && P.m(t, null), bn(t, y), A = !0, w || (D = [ + bi(t, "click", V), + bi(t, "dragstart", U), + bi(t, "dragenter", Bk( /*dragenter_handler*/ e[16] )), - br(t, "dragover", J), - br(t, "drop", Y), - br( + bi(t, "dragover", J), + bi(t, "drop", Y), + bi( t, "dragend", /*handle_drag_end*/ @@ -47796,11 +47796,11 @@ function Jg(i, e) { p(X, $) { e = X, /*allow_reordering*/ e[3] && /*normalized_files*/ - e[6].length > 1 ? L || (L = Qg(), L.c(), L.m(n, r)) : L && (L.d(1), L = null), (!A || $ & /*normalized_files*/ + e[6].length > 1 ? L || (L = Qg(), L.c(), L.m(n, i)) : L && (L.d(1), L = null), (!A || $ & /*normalized_files*/ 64) && a !== (a = /*file*/ - e[25].filename_stem + "") && rh(o, a), (!A || $ & /*normalized_files*/ + e[25].filename_stem + "") && ih(o, a), (!A || $ & /*normalized_files*/ 64) && c !== (c = /*file*/ - e[25].filename_ext + "") && rh(h, c), (!A || $ & /*normalized_files*/ + e[25].filename_ext + "") && ih(h, c), (!A || $ & /*normalized_files*/ 64 && d !== (d = /*file*/ e[25].orig_name)) && Ut(n, "aria-label", d); let Z = g; @@ -47854,35 +47854,35 @@ function Jg(i, e) { } }; } -function qk(i) { - let e, t, n, r = [], s = /* @__PURE__ */ new Map(), a, o = jg( +function qk(r) { + let e, t, n, i = [], s = /* @__PURE__ */ new Map(), a, o = jg( /*normalized_files*/ - i[6] + r[6] ); const l = (u) => ( /*file*/ u[25].url ); for (let u = 0; u < o.length; u += 1) { - let c = Xg(i, o, u), h = l(c); - s.set(h, r[u] = Jg(h, c)); + let c = Xg(r, o, u), h = l(c); + s.set(h, i[u] = Jg(h, c)); } return { c() { - e = _i("div"), t = _i("table"), n = _i("tbody"); - for (let u = 0; u < r.length; u += 1) - r[u].c(); + e = _r("div"), t = _r("table"), n = _r("tbody"); + for (let u = 0; u < i.length; u += 1) + i[u].c(); this.h(); }, l(u) { - e = pi(u, "DIV", { class: !0 }); - var c = ir(e); - t = pi(c, "TABLE", { class: !0 }); - var h = ir(t); - n = pi(h, "TBODY", { class: !0 }); - var d = ir(n); - for (let f = 0; f < r.length; f += 1) - r[f].l(d); + e = pr(u, "DIV", { class: !0 }); + var c = ri(e); + t = pr(c, "TABLE", { class: !0 }); + var h = ri(t); + n = pr(h, "TBODY", { class: !0 }); + var d = ri(n); + for (let f = 0; f < i.length; f += 1) + i[f].l(d); d.forEach(cn), h.forEach(cn), c.forEach(cn), this.h(); }, h() { @@ -47890,20 +47890,20 @@ function qk(i) { e, "max-height", /*height*/ - i[1] ? typeof /*height*/ - i[1] == "number" ? ( + r[1] ? typeof /*height*/ + r[1] == "number" ? ( /*height*/ - i[1] + "px" + r[1] + "px" ) : ( /*height*/ - i[1] + r[1] ) : "auto" ); }, m(u, c) { sa(u, e, c), bn(e, t), bn(t, n); - for (let h = 0; h < r.length; h += 1) - r[h] && r[h].m(n, null); + for (let h = 0; h < i.length; h += 1) + i[h] && i[h].m(n, null); a = !0; }, p(u, [c]) { @@ -47911,7 +47911,7 @@ function qk(i) { 32765 && (o = jg( /*normalized_files*/ u[6] - ), S4(), r = $k(r, c, l, 1, u, o, s, n, Ok, Jg, null, Xg), b4()), c & /*height*/ + ), S4(), i = $k(i, c, l, 1, u, o, s, n, Ok, Jg, null, Xg), b4()), c & /*height*/ 2 && Yg( e, "max-height", @@ -47929,29 +47929,29 @@ function qk(i) { i(u) { if (!a) { for (let c = 0; c < o.length; c += 1) - e0(r[c]); + e0(i[c]); a = !0; } }, o(u) { - for (let c = 0; c < r.length; c += 1) - t0(r[c]); + for (let c = 0; c < i.length; c += 1) + t0(i[c]); a = !1; }, d(u) { u && cn(e); - for (let c = 0; c < r.length; c += 1) - r[c].d(); + for (let c = 0; c < i.length; c += 1) + i[c].d(); } }; } -function Vk(i) { - const e = i.lastIndexOf("."); - return e === -1 ? [i, ""] : [i.slice(0, e), i.slice(e)]; +function Vk(r) { + const e = r.lastIndexOf("."); + return e === -1 ? [r, ""] : [r.slice(0, e), r.slice(e)]; } -function Kk(i, e, t) { +function Kk(r, e, t) { let n; - const r = Uk(); + const i = Uk(); let { value: s } = e, { selectable: a = !1 } = e, { height: o = void 0 } = e, { i18n: l } = e, { allow_reordering: u = !1 } = e, c = null, h = null; function d(P, V) { t(4, c = V), P.dataTransfer && (P.dataTransfer.effectAllowed = "move", P.dataTransfer.setData("text/plain", V.toString())); @@ -47977,26 +47977,26 @@ function Kk(i, e, t) { J ); const Y = Array.isArray(s) ? U : U[0]; - r("change", Y), t(4, c = null), t(5, h = null); + i("change", Y), t(4, c = null), t(5, h = null); } function p(P, V) { const U = P.currentTarget; (P.target === U || // Only select if the click is on the row itself - U && U.firstElementChild && P.composedPath().includes(U.firstElementChild)) && r("select", { + U && U.firstElementChild && P.composedPath().includes(U.firstElementChild)) && i("select", { value: n[V].orig_name, index: V }); } function b(P) { const V = n.splice(P, 1); - t(6, n = [...n]), t(15, s = n), r("delete", V[0]), r("change", n); + t(6, n = [...n]), t(15, s = n), i("delete", V[0]), i("change", n); } function y(P) { - r("download", P); + i("download", P); } const v = typeof window < "u"; function T(P) { - Ik.call(this, i, P); + Ik.call(this, r, P); } const A = (P) => y(P), w = (P) => { b(P); @@ -48005,10 +48005,10 @@ function Kk(i, e, t) { }, L = (P, V) => { p(V, P); }, I = (P, V) => d(V, P), R = (P, V) => f(V, P), M = (P, V) => g(V, P); - return i.$$set = (P) => { + return r.$$set = (P) => { "value" in P && t(15, s = P.value), "selectable" in P && t(0, a = P.selectable), "height" in P && t(1, o = P.height), "i18n" in P && t(2, l = P.i18n), "allow_reordering" in P && t(3, u = P.allow_reordering); - }, i.$$.update = () => { - i.$$.dirty & /*value*/ + }, r.$$.update = () => { + r.$$.dirty & /*value*/ 32768 && t(6, n = (Array.isArray(s) ? s : [s]).map((P) => { var V; const [U, J] = Vk((V = P.orig_name) !== null && V !== void 0 ? V : ""); @@ -48073,8 +48073,8 @@ const { } = window.__gradio__svelte__internal, { SvelteComponent: Wk, add_flush_callback: n0, - bind: i0, - binding_callbacks: r0, + bind: r0, + binding_callbacks: i0, bubble: Ea, check_outros: A4, claim_component: ls, @@ -48096,59 +48096,59 @@ const { transition_out: Xn, update_slot_base: eI } = window.__gradio__svelte__internal, { createEventDispatcher: tI, tick: nI } = window.__gradio__svelte__internal; -function iI(i) { - let e, t, n, r; +function rI(r) { + let e, t, n, i; function s(l) { - i[26](l); + r[26](l); } function a(l) { - i[27](l); + r[27](l); } let o = { filetype: ( /*file_types*/ - i[5] + r[5] ), file_count: ( /*file_count*/ - i[4] + r[4] ), max_file_size: ( /*max_file_size*/ - i[10] + r[10] ), root: ( /*root*/ - i[7] + r[7] ), stream_handler: ( /*stream_handler*/ - i[12] + r[12] ), upload: ( /*upload*/ - i[11] + r[11] ), height: ( /*height*/ - i[8] + r[8] ), $$slots: { default: [sI] }, - $$scope: { ctx: i } + $$scope: { ctx: r } }; return ( /*dragging*/ - i[14] !== void 0 && (o.dragging = /*dragging*/ - i[14]), /*uploading*/ - i[1] !== void 0 && (o.uploading = /*uploading*/ - i[1]), e = new Nh({ props: o }), r0.push(() => i0(e, "dragging", s)), r0.push(() => i0(e, "uploading", a)), e.$on( + r[14] !== void 0 && (o.dragging = /*dragging*/ + r[14]), /*uploading*/ + r[1] !== void 0 && (o.uploading = /*uploading*/ + r[1]), e = new Nh({ props: o }), i0.push(() => r0(e, "dragging", s)), i0.push(() => r0(e, "uploading", a)), e.$on( "load", /*handle_upload*/ - i[15] + r[15] ), e.$on( "error", /*error_handler_1*/ - i[28] + r[28] ), { c() { us(e.$$.fragment); @@ -48157,7 +48157,7 @@ function iI(i) { ls(e.$$.fragment, l); }, m(l, u) { - hs(e, l, u), r = !0; + hs(e, l, u), i = !0; }, p(l, u) { const c = {}; @@ -48183,10 +48183,10 @@ function iI(i) { l[1], n0(() => n = !1)), e.$set(c); }, i(l) { - r || (Mn(e.$$.fragment, l), r = !0); + i || (Mn(e.$$.fragment, l), i = !0); }, o(l) { - Xn(e.$$.fragment, l), r = !1; + Xn(e.$$.fragment, l), i = !1; }, d(l) { cs(e, l); @@ -48194,48 +48194,48 @@ function iI(i) { } ); } -function rI(i) { - let e, t, n, r; +function iI(r) { + let e, t, n, i; return e = new D_({ props: { $$slots: { default: [oI] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }), n = new jk({ props: { i18n: ( /*i18n*/ - i[9] + r[9] ), selectable: ( /*selectable*/ - i[6] + r[6] ), value: ( /*value*/ - i[0] + r[0] ), height: ( /*height*/ - i[8] + r[8] ), allow_reordering: ( /*allow_reordering*/ - i[13] + r[13] ) } }), n.$on( "select", /*select_handler*/ - i[23] + r[23] ), n.$on( "change", /*change_handler*/ - i[24] + r[24] ), n.$on( "delete", /*delete_handler*/ - i[25] + r[25] ), { c() { us(e.$$.fragment), t = pd(), us(n.$$.fragment); @@ -48244,7 +48244,7 @@ function rI(i) { ls(e.$$.fragment, s), t = gd(s), ls(n.$$.fragment, s); }, m(s, a) { - hs(e, s, a), a0(s, t, a), hs(n, s, a), r = !0; + hs(e, s, a), a0(s, t, a), hs(n, s, a), i = !0; }, p(s, a) { const o = {}; @@ -48264,81 +48264,81 @@ function rI(i) { s[13]), n.$set(l); }, i(s) { - r || (Mn(e.$$.fragment, s), Mn(n.$$.fragment, s), r = !0); + i || (Mn(e.$$.fragment, s), Mn(n.$$.fragment, s), i = !0); }, o(s) { - Xn(e.$$.fragment, s), Xn(n.$$.fragment, s), r = !1; + Xn(e.$$.fragment, s), Xn(n.$$.fragment, s), i = !1; }, d(s) { s && s0(t), cs(e, s), cs(n, s); } }; } -function sI(i) { +function sI(r) { let e; const t = ( /*#slots*/ - i[18].default + r[18].default ), n = Yk( t, - i, + r, /*$$scope*/ - i[29], + r[29], null ); return { c() { n && n.c(); }, - l(r) { - n && n.l(r); + l(i) { + n && n.l(i); }, - m(r, s) { - n && n.m(r, s), e = !0; + m(i, s) { + n && n.m(i, s), e = !0; }, - p(r, s) { + p(i, s) { n && n.p && (!e || s & /*$$scope*/ 536870912) && eI( n, t, - r, + i, /*$$scope*/ - r[29], + i[29], e ? Qk( t, /*$$scope*/ - r[29], + i[29], s, null ) : Xk( /*$$scope*/ - r[29] + i[29] ), null ); }, - i(r) { - e || (Mn(n, r), e = !0); + i(i) { + e || (Mn(n, i), e = !0); }, - o(r) { - Xn(n, r), e = !1; + o(i) { + Xn(n, i), e = !1; }, - d(r) { - n && n.d(r); + d(i) { + n && n.d(i); } }; } -function tp(i) { +function tp(r) { let e, t; - return e = new Pr({ + return e = new Pi({ props: { Icon: S_, label: ( /*i18n*/ - i[9]("common.upload") + r[9]("common.upload") ), $$slots: { default: [aI] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }), { c() { @@ -48347,15 +48347,15 @@ function tp(i) { l(n) { ls(e.$$.fragment, n); }, - m(n, r) { - hs(e, n, r), t = !0; + m(n, i) { + hs(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r & /*i18n*/ + i & /*i18n*/ 512 && (s.label = /*i18n*/ - n[9]("common.upload")), r & /*$$scope, file_types, file_count, max_file_size, root, stream_handler, upload, dragging, uploading*/ - 536894642 && (s.$$scope = { dirty: r, ctx: n }), e.$set(s); + n[9]("common.upload")), i & /*$$scope, file_types, file_count, max_file_size, root, stream_handler, upload, dragging, uploading*/ + 536894642 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); }, i(n) { t || (Mn(e.$$.fragment, n), t = !0); @@ -48368,54 +48368,54 @@ function tp(i) { } }; } -function aI(i) { - let e, t, n, r; +function aI(r) { + let e, t, n, i; function s(l) { - i[19](l); + r[19](l); } function a(l) { - i[20](l); + r[20](l); } let o = { icon_upload: !0, filetype: ( /*file_types*/ - i[5] + r[5] ), file_count: ( /*file_count*/ - i[4] + r[4] ), max_file_size: ( /*max_file_size*/ - i[10] + r[10] ), root: ( /*root*/ - i[7] + r[7] ), stream_handler: ( /*stream_handler*/ - i[12] + r[12] ), upload: ( /*upload*/ - i[11] + r[11] ) }; return ( /*dragging*/ - i[14] !== void 0 && (o.dragging = /*dragging*/ - i[14]), /*uploading*/ - i[1] !== void 0 && (o.uploading = /*uploading*/ - i[1]), e = new Nh({ props: o }), r0.push(() => i0(e, "dragging", s)), r0.push(() => i0(e, "uploading", a)), e.$on( + r[14] !== void 0 && (o.dragging = /*dragging*/ + r[14]), /*uploading*/ + r[1] !== void 0 && (o.uploading = /*uploading*/ + r[1]), e = new Nh({ props: o }), i0.push(() => r0(e, "dragging", s)), i0.push(() => r0(e, "uploading", a)), e.$on( "load", /*handle_upload*/ - i[15] + r[15] ), e.$on( "error", /*error_handler*/ - i[21] + r[21] ), { c() { us(e.$$.fragment); @@ -48424,7 +48424,7 @@ function aI(i) { ls(e.$$.fragment, l); }, m(l, u) { - hs(e, l, u), r = !0; + hs(e, l, u), i = !0; }, p(l, u) { const c = {}; @@ -48447,10 +48447,10 @@ function aI(i) { l[1], n0(() => n = !1)), e.$set(c); }, i(l) { - r || (Mn(e.$$.fragment, l), r = !0); + i || (Mn(e.$$.fragment, l), i = !0); }, o(l) { - Xn(e.$$.fragment, l), r = !1; + Xn(e.$$.fragment, l), i = !1; }, d(l) { cs(e, l); @@ -48458,30 +48458,30 @@ function aI(i) { } ); } -function oI(i) { +function oI(r) { let e = !/*file_count*/ - (i[4] === "single" && (Array.isArray( + (r[4] === "single" && (Array.isArray( /*value*/ - i[0] + r[0] ) ? ( /*value*/ - i[0].length > 0 + r[0].length > 0 ) : ( /*value*/ - i[0] !== null - ))), t, n, r, s = e && tp(i); - return n = new Pr({ + r[0] !== null + ))), t, n, i, s = e && tp(r); + return n = new Pi({ props: { Icon: Ph, label: ( /*i18n*/ - i[9]("common.clear") + r[9]("common.clear") ) } }), n.$on( "click", /*click_handler*/ - i[22] + r[22] ), { c() { s && s.c(), t = pd(), us(n.$$.fragment); @@ -48490,7 +48490,7 @@ function oI(i) { s && s.l(a), t = gd(a), ls(n.$$.fragment, a); }, m(a, o) { - s && s.m(a, o), a0(a, t, o), hs(n, a, o), r = !0; + s && s.m(a, o), a0(a, t, o), hs(n, a, o), i = !0; }, p(a, o) { o & /*file_count, value*/ @@ -48514,34 +48514,34 @@ function oI(i) { a[9]("common.clear")), n.$set(l); }, i(a) { - r || (Mn(s), Mn(n.$$.fragment, a), r = !0); + i || (Mn(s), Mn(n.$$.fragment, a), i = !0); }, o(a) { - Xn(s), Xn(n.$$.fragment, a), r = !1; + Xn(s), Xn(n.$$.fragment, a), i = !1; }, d(a) { a && s0(t), s && s.d(a), cs(n, a); } }; } -function lI(i) { - let e, t, n, r, s, a, o; +function lI(r) { + let e, t, n, i, s, a, o; e = new v_({ props: { show_label: ( /*show_label*/ - i[3] + r[3] ), Icon: j5, float: !/*value*/ - i[0], + r[0], label: ( /*label*/ - i[2] || "File" + r[2] || "File" ) } }); - const l = [rI, iI], u = []; + const l = [iI, rI], u = []; function c(h, d) { return d & /*value*/ 1 && (n = null), n == null && (n = !!/*value*/ @@ -48551,7 +48551,7 @@ function lI(i) { ) || /*value*/ h[0].length > 0))), n ? 0 : 1; } - return r = c(i, -1), s = u[r] = l[r](i), { + return i = c(r, -1), s = u[i] = l[i](r), { c() { us(e.$$.fragment), t = pd(), s.c(), a = ep(); }, @@ -48559,7 +48559,7 @@ function lI(i) { ls(e.$$.fragment, h), t = gd(h), s.l(h), a = ep(); }, m(h, d) { - hs(e, h, d), a0(h, t, d), u[r].m(h, d), a0(h, a, d), o = !0; + hs(e, h, d), a0(h, t, d), u[i].m(h, d), a0(h, a, d), o = !0; }, p(h, [d]) { const f = {}; @@ -48570,10 +48570,10 @@ function lI(i) { h[0]), d & /*label*/ 4 && (f.label = /*label*/ h[2] || "File"), e.$set(f); - let m = r; - r = c(h, d), r === m ? u[r].p(h, d) : (x4(), Xn(u[m], 1, 1, () => { + let m = i; + i = c(h, d), i === m ? u[i].p(h, d) : (x4(), Xn(u[m], 1, 1, () => { u[m] = null; - }), A4(), s = u[r], s ? s.p(h, d) : (s = u[r] = l[r](h), s.c()), Mn(s, 1), s.m(a.parentNode, a)); + }), A4(), s = u[i], s ? s.p(h, d) : (s = u[i] = l[i](h), s.c()), Mn(s, 1), s.m(a.parentNode, a)); }, i(h) { o || (Mn(e.$$.fragment, h), Mn(s), o = !0); @@ -48582,12 +48582,12 @@ function lI(i) { Xn(e.$$.fragment, h), Xn(s), o = !1; }, d(h) { - h && (s0(t), s0(a)), cs(e, h), u[r].d(h); + h && (s0(t), s0(a)), cs(e, h), u[i].d(h); } }; } -function uI(i, e, t) { - let { $$slots: n = {}, $$scope: r } = e; +function uI(r, e, t) { + let { $$slots: n = {}, $$scope: i } = e; var s = this && this.__awaiter || function($, Z, ne, B) { function q(se) { return se instanceof ne ? se : new ne(function(he) { @@ -48633,19 +48633,19 @@ function uI(i, e, t) { y = $, t(1, y); } function R($) { - Ea.call(this, i, $); + Ea.call(this, r, $); } const M = ($) => { w("clear"), $.stopPropagation(), A(); }; function P($) { - Ea.call(this, i, $); + Ea.call(this, r, $); } function V($) { - Ea.call(this, i, $); + Ea.call(this, r, $); } function U($) { - Ea.call(this, i, $); + Ea.call(this, r, $); } function J($) { D = $, t(14, D); @@ -48654,12 +48654,12 @@ function uI(i, e, t) { y = $, t(1, y); } function X($) { - Ea.call(this, i, $); + Ea.call(this, r, $); } - return i.$$set = ($) => { - "value" in $ && t(0, a = $.value), "label" in $ && t(2, o = $.label), "show_label" in $ && t(3, l = $.show_label), "file_count" in $ && t(4, u = $.file_count), "file_types" in $ && t(5, c = $.file_types), "selectable" in $ && t(6, h = $.selectable), "root" in $ && t(7, d = $.root), "height" in $ && t(8, f = $.height), "i18n" in $ && t(9, m = $.i18n), "max_file_size" in $ && t(10, g = $.max_file_size), "upload" in $ && t(11, p = $.upload), "stream_handler" in $ && t(12, b = $.stream_handler), "uploading" in $ && t(1, y = $.uploading), "allow_reordering" in $ && t(13, v = $.allow_reordering), "$$scope" in $ && t(29, r = $.$$scope); - }, i.$$.update = () => { - i.$$.dirty & /*dragging*/ + return r.$$set = ($) => { + "value" in $ && t(0, a = $.value), "label" in $ && t(2, o = $.label), "show_label" in $ && t(3, l = $.show_label), "file_count" in $ && t(4, u = $.file_count), "file_types" in $ && t(5, c = $.file_types), "selectable" in $ && t(6, h = $.selectable), "root" in $ && t(7, d = $.root), "height" in $ && t(8, f = $.height), "i18n" in $ && t(9, m = $.i18n), "max_file_size" in $ && t(10, g = $.max_file_size), "upload" in $ && t(11, p = $.upload), "stream_handler" in $ && t(12, b = $.stream_handler), "uploading" in $ && t(1, y = $.uploading), "allow_reordering" in $ && t(13, v = $.allow_reordering), "$$scope" in $ && t(29, i = $.$$scope); + }, r.$$.update = () => { + r.$$.dirty & /*dragging*/ 16384 && w("drag", D); }, [ a, @@ -48691,7 +48691,7 @@ function uI(i, e, t) { J, Y, X, - r + i ]; } class cI extends Wk { @@ -48734,8 +48734,8 @@ const { SvelteComponent: eW, add_flush_callback: tW, assign: nW, - bind: iW, - binding_callbacks: rW, + bind: rW, + binding_callbacks: iW, check_outros: sW, claim_component: aW, claim_space: oW, @@ -48759,14 +48759,14 @@ const { append_hydration: Qa, attr: hn, children: ea, - claim_element: Rr, + claim_element: Ri, claim_space: dI, claim_text: np, destroy_each: fI, detach: Bn, - element: Cr, - empty: ip, - ensure_array_like: rp, + element: Ci, + empty: rp, + ensure_array_like: ip, get_svelte_dataset: mI, init: gI, insert_hydration: ps, @@ -48778,33 +48778,33 @@ const { text: sp, toggle_class: Rs } = window.__gradio__svelte__internal; -function ap(i, e, t) { - const n = i.slice(); +function ap(r, e, t) { + const n = r.slice(); return n[3] = e[t], n; } -function op(i) { - let e, t, n = rp( +function op(r) { + let e, t, n = ip( /*value*/ - i[0].slice(0, 5) - ), r = []; + r[0].slice(0, 5) + ), i = []; for (let a = 0; a < n.length; a += 1) - r[a] = lp(ap(i, n, a)); + i[a] = lp(ap(r, n, a)); let s = ( /*value*/ - i[0].length > 5 && up(i) + r[0].length > 5 && up(r) ); return { c() { - e = Cr("div"); - for (let a = 0; a < r.length; a += 1) - r[a].c(); + e = Ci("div"); + for (let a = 0; a < i.length; a += 1) + i[a].c(); t = vI(), s && s.c(), this.h(); }, l(a) { - e = Rr(a, "DIV", { class: !0 }); + e = Ri(a, "DIV", { class: !0 }); var o = ea(e); - for (let l = 0; l < r.length; l += 1) - r[l].l(o); + for (let l = 0; l < i.length; l += 1) + i[l].l(o); t = dI(o), s && s.l(o), o.forEach(Bn), this.h(); }, h() { @@ -48812,48 +48812,48 @@ function op(i) { }, m(a, o) { ps(a, e, o); - for (let l = 0; l < r.length; l += 1) - r[l] && r[l].m(e, null); + for (let l = 0; l < i.length; l += 1) + i[l] && i[l].m(e, null); Qa(e, t), s && s.m(e, null); }, p(a, o) { if (o & /*value*/ 1) { - n = rp( + n = ip( /*value*/ a[0].slice(0, 5) ); let l; for (l = 0; l < n.length; l += 1) { const u = ap(a, n, l); - r[l] ? r[l].p(u, o) : (r[l] = lp(u), r[l].c(), r[l].m(e, t)); + i[l] ? i[l].p(u, o) : (i[l] = lp(u), i[l].c(), i[l].m(e, t)); } - for (; l < r.length; l += 1) - r[l].d(1); - r.length = n.length; + for (; l < i.length; l += 1) + i[l].d(1); + i.length = n.length; } /*value*/ a[0].length > 5 ? s ? s.p(a, o) : (s = up(a), s.c(), s.m(e, null)) : s && (s.d(1), s = null); }, d(a) { - a && Bn(e), fI(r, a), s && s.d(); + a && Bn(e), fI(i, a), s && s.d(); } }; } -function yI(i) { +function yI(r) { let e, t = ''; return { c() { - e = Cr("div"), e.innerHTML = t, this.h(); + e = Ci("div"), e.innerHTML = t, this.h(); }, l(n) { - e = Rr(n, "DIV", { class: !0, "data-svelte-h": !0 }), mI(e) !== "svelte-19pyv4n" && (e.innerHTML = t), this.h(); + e = Ri(n, "DIV", { class: !0, "data-svelte-h": !0 }), mI(e) !== "svelte-19pyv4n" && (e.innerHTML = t), this.h(); }, h() { hn(e, "class", "image-container audio svelte-nb996j"); }, - m(n, r) { - ps(n, e, r); + m(n, i) { + ps(n, e, i); }, p: sh, d(n) { @@ -48861,49 +48861,49 @@ function yI(i) { } }; } -function bI(i) { +function bI(r) { let e, t, n; return { c() { - e = Cr("div"), t = Cr("video"), this.h(); + e = Ci("div"), t = Ci("video"), this.h(); }, - l(r) { - e = Rr(r, "DIV", { class: !0 }); + l(i) { + e = Ri(i, "DIV", { class: !0 }); var s = ea(e); - t = Rr(s, "VIDEO", { src: !0, preload: !0, class: !0 }), ea(t).forEach(Bn), s.forEach(Bn), this.h(); + t = Ri(s, "VIDEO", { src: !0, preload: !0, class: !0 }), ea(t).forEach(Bn), s.forEach(Bn), this.h(); }, h() { o0(t.src, n = /*item*/ - i[3].video.url) || hn(t, "src", n), t.controls = !1, t.muted = !0, hn(t, "preload", "metadata"), hn(t, "class", "svelte-nb996j"), hn(e, "class", "image-container svelte-nb996j"); + r[3].video.url) || hn(t, "src", n), t.controls = !1, t.muted = !0, hn(t, "preload", "metadata"), hn(t, "class", "svelte-nb996j"), hn(e, "class", "image-container svelte-nb996j"); }, - m(r, s) { - ps(r, e, s), Qa(e, t); + m(i, s) { + ps(i, e, s), Qa(e, t); }, - p(r, s) { + p(i, s) { s & /*value*/ 1 && !o0(t.src, n = /*item*/ - r[3].video.url) && hn(t, "src", n); + i[3].video.url) && hn(t, "src", n); }, - d(r) { - r && Bn(e); + d(i) { + i && Bn(e); } }; } -function EI(i) { - let e, t, n, r; +function EI(r) { + let e, t, n, i; return { c() { - e = Cr("div"), t = Cr("img"), this.h(); + e = Ci("div"), t = Ci("img"), this.h(); }, l(s) { - e = Rr(s, "DIV", { class: !0 }); + e = Ri(s, "DIV", { class: !0 }); var a = ea(e); - t = Rr(a, "IMG", { src: !0, alt: !0, class: !0 }), a.forEach(Bn), this.h(); + t = Ri(a, "IMG", { src: !0, alt: !0, class: !0 }), a.forEach(Bn), this.h(); }, h() { o0(t.src, n = /*item*/ - i[3].image.url) || hn(t, "src", n), hn(t, "alt", r = /*item*/ - i[3].caption || ""), hn(t, "class", "svelte-nb996j"), hn(e, "class", "image-container svelte-nb996j"); + r[3].image.url) || hn(t, "src", n), hn(t, "alt", i = /*item*/ + r[3].caption || ""), hn(t, "class", "svelte-nb996j"), hn(e, "class", "image-container svelte-nb996j"); }, m(s, a) { ps(s, e, a), Qa(e, t); @@ -48912,15 +48912,15 @@ function EI(i) { a & /*value*/ 1 && !o0(t.src, n = /*item*/ s[3].image.url) && hn(t, "src", n), a & /*value*/ - 1 && r !== (r = /*item*/ - s[3].caption || "") && hn(t, "alt", r); + 1 && i !== (i = /*item*/ + s[3].caption || "") && hn(t, "alt", i); }, d(s) { s && Bn(e); } }; } -function lp(i) { +function lp(r) { let e; function t(s, a) { if ("image" in /*item*/ @@ -48933,107 +48933,107 @@ function lp(i) { s[3] && /*item*/ s[3].audio) return yI; } - let n = t(i), r = n && n(i); + let n = t(r), i = n && n(r); return { c() { - r && r.c(), e = ip(); + i && i.c(), e = rp(); }, l(s) { - r && r.l(s), e = ip(); + i && i.l(s), e = rp(); }, m(s, a) { - r && r.m(s, a), ps(s, e, a); + i && i.m(s, a), ps(s, e, a); }, p(s, a) { - n === (n = t(s)) && r ? r.p(s, a) : (r && r.d(1), r = n && n(s), r && (r.c(), r.m(e.parentNode, e))); + n === (n = t(s)) && i ? i.p(s, a) : (i && i.d(1), i = n && n(s), i && (i.c(), i.m(e.parentNode, e))); }, d(s) { - s && Bn(e), r && r.d(s); + s && Bn(e), i && i.d(s); } }; } -function up(i) { +function up(r) { let e, t, n = ( /*value*/ - i[0].length - 5 + "" - ), r; + r[0].length - 5 + "" + ), i; return { c() { - e = Cr("div"), t = sp("+"), r = sp(n), this.h(); + e = Ci("div"), t = sp("+"), i = sp(n), this.h(); }, l(s) { - e = Rr(s, "DIV", { class: !0 }); + e = Ri(s, "DIV", { class: !0 }); var a = ea(e); - t = np(a, "+"), r = np(a, n), a.forEach(Bn), this.h(); + t = np(a, "+"), i = np(a, n), a.forEach(Bn), this.h(); }, h() { hn(e, "class", "more-indicator svelte-nb996j"); }, m(s, a) { - ps(s, e, a), Qa(e, t), Qa(e, r); + ps(s, e, a), Qa(e, t), Qa(e, i); }, p(s, a) { a & /*value*/ 1 && n !== (n = /*value*/ - s[0].length - 5 + "") && _I(r, n); + s[0].length - 5 + "") && _I(i, n); }, d(s) { s && Bn(e); } }; } -function SI(i) { +function SI(r) { let e, t = ( /*value*/ - i[0] && /*value*/ - i[0].length > 0 && op(i) + r[0] && /*value*/ + r[0].length > 0 && op(r) ); return { c() { - e = Cr("div"), t && t.c(), this.h(); + e = Ci("div"), t && t.c(), this.h(); }, l(n) { - e = Rr(n, "DIV", { class: !0 }); - var r = ea(e); - t && t.l(r), r.forEach(Bn), this.h(); + e = Ri(n, "DIV", { class: !0 }); + var i = ea(e); + t && t.l(i), i.forEach(Bn), this.h(); }, h() { hn(e, "class", "container svelte-nb996j"), Rs( e, "table", /*type*/ - i[1] === "table" + r[1] === "table" ), Rs( e, "gallery", /*type*/ - i[1] === "gallery" + r[1] === "gallery" ), Rs( e, "selected", /*selected*/ - i[2] + r[2] ); }, - m(n, r) { - ps(n, e, r), t && t.m(e, null); + m(n, i) { + ps(n, e, i), t && t.m(e, null); }, - p(n, [r]) { + p(n, [i]) { /*value*/ n[0] && /*value*/ - n[0].length > 0 ? t ? t.p(n, r) : (t = op(n), t.c(), t.m(e, null)) : t && (t.d(1), t = null), r & /*type*/ + n[0].length > 0 ? t ? t.p(n, i) : (t = op(n), t.c(), t.m(e, null)) : t && (t.d(1), t = null), i & /*type*/ 2 && Rs( e, "table", /*type*/ n[1] === "table" - ), r & /*type*/ + ), i & /*type*/ 2 && Rs( e, "gallery", /*type*/ n[1] === "gallery" - ), r & /*selected*/ + ), i & /*selected*/ 4 && Rs( e, "selected", @@ -49048,11 +49048,11 @@ function SI(i) { } }; } -function TI(i, e, t) { - let { value: n } = e, { type: r } = e, { selected: s = !1 } = e; - return i.$$set = (a) => { - "value" in a && t(0, n = a.value), "type" in a && t(1, r = a.type), "selected" in a && t(2, s = a.selected); - }, [n, r, s]; +function TI(r, e, t) { + let { value: n } = e, { type: i } = e, { selected: s = !1 } = e; + return r.$$set = (a) => { + "value" in a && t(0, n = a.value), "type" in a && t(1, i = a.type), "selected" in a && t(2, s = a.selected); + }, [n, i, s]; } class TW extends hI { constructor(e) { @@ -49083,133 +49083,133 @@ const { transition_in: es, transition_out: ts } = window.__gradio__svelte__internal, { createEventDispatcher: PI } = window.__gradio__svelte__internal; -function MI(i) { - let e, t, n, r; +function MI(r) { + let e, t, n, i; function s(l) { - i[34](l); + r[34](l); } function a(l) { - i[35](l); + r[35](l); } let o = { label: ( /*label*/ - i[5] + r[5] ), show_label: ( /*show_label*/ - i[4] + r[4] ), columns: ( /*columns*/ - i[14] + r[14] ), rows: ( /*rows*/ - i[15] + r[15] ), height: ( /*height*/ - i[16] + r[16] ), preview: ( /*preview*/ - i[17] + r[17] ), object_fit: ( /*object_fit*/ - i[19] + r[19] ), interactive: ( /*interactive*/ - i[21] + r[21] ), allow_preview: ( /*allow_preview*/ - i[18] + r[18] ), show_share_button: ( /*show_share_button*/ - i[20] + r[20] ), show_download_button: ( /*show_download_button*/ - i[22] + r[22] ), i18n: ( /*gradio*/ - i[23].i18n + r[23].i18n ), _fetch: ( /*func_2*/ - i[31] + r[31] ), show_fullscreen_button: ( /*show_fullscreen_button*/ - i[24] + r[24] ), fullscreen: ( /*fullscreen*/ - i[3] + r[3] ), root: ( /*root*/ - i[6] + r[6] ), file_types: ( /*file_types*/ - i[10] + r[10] ), max_file_size: ( /*gradio*/ - i[23].max_file_size + r[23].max_file_size ), upload: ( /*func_3*/ - i[32] + r[32] ), stream_handler: ( /*func_4*/ - i[33] + r[33] ) }; return ( /*selected_index*/ - i[1] !== void 0 && (o.selected_index = /*selected_index*/ - i[1]), /*value*/ - i[0] !== void 0 && (o.value = /*value*/ - i[0]), e = new xD({ props: o }), lh.push(() => oh(e, "selected_index", s)), lh.push(() => oh(e, "value", a)), e.$on( + r[1] !== void 0 && (o.selected_index = /*selected_index*/ + r[1]), /*value*/ + r[0] !== void 0 && (o.value = /*value*/ + r[0]), e = new xD({ props: o }), lh.push(() => oh(e, "selected_index", s)), lh.push(() => oh(e, "value", a)), e.$on( "change", /*change_handler*/ - i[36] + r[36] ), e.$on( "select", /*select_handler*/ - i[37] + r[37] ), e.$on( "share", /*share_handler*/ - i[38] + r[38] ), e.$on( "error", /*error_handler_1*/ - i[39] + r[39] ), e.$on( "preview_open", /*preview_open_handler*/ - i[40] + r[40] ), e.$on( "preview_close", /*preview_close_handler*/ - i[41] + r[41] ), e.$on( "fullscreen", /*fullscreen_handler*/ - i[42] + r[42] ), e.$on( "upload", /*handle_upload*/ - i[26] + r[26] ), { c() { uo(e.$$.fragment); @@ -49218,7 +49218,7 @@ function MI(i) { lo(e.$$.fragment, l); }, m(l, u) { - ho(e, l, u), r = !0; + ho(e, l, u), i = !0; }, p(l, u) { const c = {}; @@ -49269,10 +49269,10 @@ function MI(i) { l[0], ah(() => n = !1)), e.$set(c); }, i(l) { - r || (es(e.$$.fragment, l), r = !0); + i || (es(e.$$.fragment, l), i = !0); }, o(l) { - ts(e.$$.fragment, l), r = !1; + ts(e.$$.fragment, l), i = !1; }, d(l) { co(e, l); @@ -49280,51 +49280,51 @@ function MI(i) { } ); } -function OI(i) { +function OI(r) { let e, t; return e = new cI({ props: { value: null, root: ( /*root*/ - i[6] + r[6] ), label: ( /*label*/ - i[5] + r[5] ), file_types: ( /*file_types*/ - i[10] + r[10] ), max_file_size: ( /*gradio*/ - i[23].max_file_size + r[23].max_file_size ), file_count: "multiple", i18n: ( /*gradio*/ - i[23].i18n + r[23].i18n ), upload: ( /*func*/ - i[28] + r[28] ), stream_handler: ( /*func_1*/ - i[29] + r[29] ), $$slots: { default: [BI] }, - $$scope: { ctx: i } + $$scope: { ctx: r } } }), e.$on( "upload", /*handle_upload*/ - i[26] + r[26] ), e.$on( "error", /*error_handler*/ - i[30] + r[30] ), { c() { uo(e.$$.fragment); @@ -49332,28 +49332,28 @@ function OI(i) { l(n) { lo(e.$$.fragment, n); }, - m(n, r) { - ho(e, n, r), t = !0; + m(n, i) { + ho(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*root*/ + i[0] & /*root*/ 64 && (s.root = /*root*/ - n[6]), r[0] & /*label*/ + n[6]), i[0] & /*label*/ 32 && (s.label = /*label*/ - n[5]), r[0] & /*file_types*/ + n[5]), i[0] & /*file_types*/ 1024 && (s.file_types = /*file_types*/ - n[10]), r[0] & /*gradio*/ + n[10]), i[0] & /*gradio*/ 8388608 && (s.max_file_size = /*gradio*/ - n[23].max_file_size), r[0] & /*gradio*/ + n[23].max_file_size), i[0] & /*gradio*/ 8388608 && (s.i18n = /*gradio*/ - n[23].i18n), r[0] & /*gradio*/ + n[23].i18n), i[0] & /*gradio*/ 8388608 && (s.upload = /*func*/ - n[28]), r[0] & /*gradio*/ + n[28]), i[0] & /*gradio*/ 8388608 && (s.stream_handler = /*func_1*/ - n[29]), r[0] & /*gradio*/ - 8388608 | r[1] & /*$$scope*/ - 262144 && (s.$$scope = { dirty: r, ctx: n }), e.$set(s); + n[29]), i[0] & /*gradio*/ + 8388608 | i[1] & /*$$scope*/ + 262144 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s); }, i(n) { t || (es(e.$$.fragment, n), t = !0); @@ -49366,13 +49366,13 @@ function OI(i) { } }; } -function BI(i) { +function BI(r) { let e, t; return e = new Z6({ props: { i18n: ( /*gradio*/ - i[23].i18n + r[23].i18n ), type: "gallery" } @@ -49383,12 +49383,12 @@ function BI(i) { l(n) { lo(e.$$.fragment, n); }, - m(n, r) { - ho(e, n, r), t = !0; + m(n, i) { + ho(e, n, i), t = !0; }, - p(n, r) { + p(n, i) { const s = {}; - r[0] & /*gradio*/ + i[0] & /*gradio*/ 8388608 && (s.i18n = /*gradio*/ n[23].i18n), e.$set(s); }, @@ -49403,21 +49403,21 @@ function BI(i) { } }; } -function NI(i) { - let e, t, n, r, s, a; +function NI(r) { + let e, t, n, i, s, a; const o = [ { autoscroll: ( /*gradio*/ - i[23].autoscroll + r[23].autoscroll ) }, { i18n: ( /*gradio*/ - i[23].i18n + r[23].i18n ) }, /*loading_status*/ - i[2] + r[2] ]; let l = {}; for (let d = 0; d < o.length; d += 1) @@ -49425,7 +49425,7 @@ function NI(i) { e = new sk({ props: l }), e.$on( "clear_status", /*clear_status_handler*/ - i[27] + r[27] ); const u = [OI, MI], c = []; function h(d, f) { @@ -49435,12 +49435,12 @@ function NI(i) { d[25] ? 0 : 1 ); } - return n = h(i), r = c[n] = u[n](i), { + return n = h(r), i = c[n] = u[n](r), { c() { - uo(e.$$.fragment), t = FI(), r.c(), s = hp(); + uo(e.$$.fragment), t = FI(), i.c(), s = hp(); }, l(d) { - lo(e.$$.fragment, d), t = DI(d), r.l(d), s = hp(); + lo(e.$$.fragment, d), t = DI(d), i.l(d), s = hp(); }, m(d, f) { ho(e, d, f), dp(d, t, f), c[n].m(d, f), dp(d, s, f), a = !0; @@ -49470,64 +49470,64 @@ function NI(i) { let g = n; n = h(d), n === g ? c[n].p(d, f) : (LI(), ts(c[g], 1, 1, () => { c[g] = null; - }), wI(), r = c[n], r ? r.p(d, f) : (r = c[n] = u[n](d), r.c()), es(r, 1), r.m(s.parentNode, s)); + }), wI(), i = c[n], i ? i.p(d, f) : (i = c[n] = u[n](d), i.c()), es(i, 1), i.m(s.parentNode, s)); }, i(d) { - a || (es(e.$$.fragment, d), es(r), a = !0); + a || (es(e.$$.fragment, d), es(i), a = !0); }, o(d) { - ts(e.$$.fragment, d), ts(r), a = !1; + ts(e.$$.fragment, d), ts(i), a = !1; }, d(d) { d && (cp(t), cp(s)), co(e, d), c[n].d(d); } }; } -function $I(i) { +function $I(r) { let e, t, n; - function r(a) { - i[43](a); + function i(a) { + r[43](a); } let s = { visible: ( /*visible*/ - i[9] + r[9] ), variant: "solid", padding: !1, elem_id: ( /*elem_id*/ - i[7] + r[7] ), elem_classes: ( /*elem_classes*/ - i[8] + r[8] ), container: ( /*container*/ - i[11] + r[11] ), scale: ( /*scale*/ - i[12] + r[12] ), min_width: ( /*min_width*/ - i[13] + r[13] ), allow_overflow: !1, height: typeof /*height*/ - i[16] == "number" ? ( + r[16] == "number" ? ( /*height*/ - i[16] + r[16] ) : void 0, $$slots: { default: [NI] }, - $$scope: { ctx: i } + $$scope: { ctx: r } }; return ( /*fullscreen*/ - i[3] !== void 0 && (s.fullscreen = /*fullscreen*/ - i[3]), e = new Y4({ props: s }), lh.push(() => oh(e, "fullscreen", r)), { + r[3] !== void 0 && (s.fullscreen = /*fullscreen*/ + r[3]), e = new Y4({ props: s }), lh.push(() => oh(e, "fullscreen", i)), { c() { uo(e.$$.fragment); }, @@ -49574,16 +49574,16 @@ function $I(i) { } ); } -function UI(i, e, t) { +function UI(r, e, t) { let n; - var r = this && this.__awaiter || function(W, Fe, pe, Me) { + var i = this && this.__awaiter || function(W, Fe, pe, Me) { function Et(Ct) { return Ct instanceof pe ? Ct : new pe(function(Gt) { Gt(Ct); }); } return new (pe || (pe = Promise))(function(Ct, Gt) { - function ur(gt) { + function ui(gt) { try { _n(Me.next(gt)); } catch (Ft) { @@ -49598,7 +49598,7 @@ function UI(i, e, t) { } } function _n(gt) { - gt.done ? Ct(gt.value) : Et(gt.value).then(ur, Un); + gt.done ? Ct(gt.value) : Et(gt.value).then(ui, Un); } _n((Me = Me.apply(W, Fe || [])).next()); }); @@ -49612,8 +49612,8 @@ function UI(i, e, t) { return J.some((Me) => pe.endsWith(Me)); } function X(W) { - return r(this, void 0, void 0, function* () { - return (yield Promise.all(W.map((pe) => r(this, void 0, void 0, function* () { + return i(this, void 0, void 0, function* () { + return (yield Promise.all(W.map((pe) => i(this, void 0, void 0, function* () { var Me; if (!((Me = pe.path) === null || Me === void 0) && Me.toLowerCase().endsWith(".svg") && pe.url) { const Ct = yield (yield fetch(pe.url)).text(); @@ -49629,7 +49629,7 @@ function UI(i, e, t) { }); } function $(W) { - return r(this, void 0, void 0, function* () { + return i(this, void 0, void 0, function* () { const Fe = Array.isArray(W.detail) ? W.detail : [W.detail], pe = yield X(Fe); d && d.length > 0 ? t(0, d = [...d, ...pe]) : t(0, d = pe), M.dispatch("upload", d), M.dispatch("change", d); }); @@ -49649,11 +49649,11 @@ function UI(i, e, t) { function Ht(W) { V = W, t(3, V); } - return i.$$set = (W) => { + return r.$$set = (W) => { "loading_status" in W && t(2, s = W.loading_status), "show_label" in W && t(4, a = W.show_label), "label" in W && t(5, o = W.label), "root" in W && t(6, l = W.root), "elem_id" in W && t(7, u = W.elem_id), "elem_classes" in W && t(8, c = W.elem_classes), "visible" in W && t(9, h = W.visible), "value" in W && t(0, d = W.value), "file_types" in W && t(10, f = W.file_types), "container" in W && t(11, m = W.container), "scale" in W && t(12, g = W.scale), "min_width" in W && t(13, p = W.min_width), "columns" in W && t(14, b = W.columns), "rows" in W && t(15, y = W.rows), "height" in W && t(16, v = W.height), "preview" in W && t(17, T = W.preview), "allow_preview" in W && t(18, A = W.allow_preview), "selected_index" in W && t(1, w = W.selected_index), "object_fit" in W && t(19, D = W.object_fit), "show_share_button" in W && t(20, L = W.show_share_button), "interactive" in W && t(21, I = W.interactive), "show_download_button" in W && t(22, R = W.show_download_button), "gradio" in W && t(23, M = W.gradio), "show_fullscreen_button" in W && t(24, P = W.show_fullscreen_button), "fullscreen" in W && t(3, V = W.fullscreen); - }, i.$$.update = () => { - i.$$.dirty[0] & /*value*/ - 1 && t(25, n = d === null ? !0 : d.length === 0), i.$$.dirty[0] & /*selected_index*/ + }, r.$$.update = () => { + r.$$.dirty[0] & /*value*/ + 1 && t(25, n = d === null ? !0 : d.length === 0), r.$$.dirty[0] & /*selected_index*/ 2 && U("prop_change", { selected_index: w }); }, [ d,